【发布时间】:2015-11-11 10:34:09
【问题描述】:
<asp:RadioButtonList ID="rbnPropertyType" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem Text="Commercial" Value="1" />
<asp:ListItem Text="Residential" Value="2" />
这是 ma aspx 代码。 .cs 代码是
? = dtPolicyInfo.Rows[0]["PropertyType"].ToString();
如何根据数据库结果设置单选按钮选择值?
【问题讨论】:
-
不,不是。因为数据库价值可能是商业或住宅。根据属性类型值,应该选择它进行编辑。
标签: c# asp.net radio-button