有没有办法在数组中选择一个单选框?如果数值小于0,则选择数组中的单选框
我有以下代码:
if (Convert.ToInt32(Part2SummaryAmount) <= 0);
{
rdoPart2SummaryChoice.Items[2].Selected = true;
}
什么我想要做的是,如果Part2SummaryAmount小于等于0我想选择一个单选框。
<asp:RadioButtonList ID="rdoPart2SummaryChoice" runat="server">
<asp:ListItem Value="1" Text="There is enough money to cover your basic living expenses." />
<asp:ListItem Value="2" Text="" />
<asp:ListItem Value="3" Text="" />
</asp:RadioButtonList>
这是正确的方式去做这件事吗?我也不太清楚这个错误:
尝试解析浮点数'Convert.ToDouble'代替 – Grundy 2014-12-09 11:24:02
你是什么'CurrentCulture'? – 2014-12-09 11:33:38
没有CurrentCuture类。我需要一个吗? – 2014-12-10 15:14:56