If Radio5.Checked Then
Response.Write("你选的是radio5")
ElseIf Radio6.Checked Then
Response.Write("你选的是radio6")
ElseIf Radio7.Checked Then
Response.Write("你选的是radio7")
ElseIf Radio8.Checked Then
Response.Write("你选的是radio8") End If我是这样写的,但是,报错说:“找不到对象”
如果把radio放到datalist的外里,就可以!!!
请大家帮帮忙!!!
Response.Write("你选的是radio5")
ElseIf Radio6.Checked Then
Response.Write("你选的是radio6")
ElseIf Radio7.Checked Then
Response.Write("你选的是radio7")
ElseIf Radio8.Checked Then
Response.Write("你选的是radio8") End If我是这样写的,但是,报错说:“找不到对象”
如果把radio放到datalist的外里,就可以!!!
请大家帮帮忙!!!
解决方案 »
- 怎么在<a href></a>标签中加入代码
- jquery怎么动态添加checkboxlist选项?
- 怎样定义要处理数据的页面?大大虾们,求救
- ASP.NET关于在线用户列表问题!
- 请问武汉那所培训IT学校好点,要求可以高升本的!
- 如何server 端验证输入, 然后在client 端弹出alert
- 函数如何返回数组
- 怎样屏蔽IE工具栏里面的后退和刷新按钮!?
- 我用框架做网页,分上中下,上和下页是不变的,就是变中间。js里应要怎样写呢?而且中间页还有好多处连接。
- Duwamish 7.0安装时提示"Internal Error:2738是何原因?
- 在web中视频捕获,并且把视频和声音录下来,怎么实现?
- Asp.net连接Linux环境下mysql中文显示乱码!!
<ItemTemplate>
<asp:RadioButton id="RadioButton1" runat="server"></asp:RadioButton>
</ItemTemplate>
</asp:DataList>**************
for i as integer=0 to DataList1.Items.Count {
dim tmp as RadioButton = this.DataList1.Items[i].FindControl("RadioButton1")
if tmp.Checked then
Response.Write("你选的是radio" + i.ToString())
end if
next
{
if(e.CommandName=="Select"//要设置按钮的CommandName名称)
{
RadioButton r5=(RadioButton)e.Item.FindControl("Radio5");
RadioButton r6=(RadioButton)e.Item.FindControl("Radio6");
RadioButton r7=(RadioButton)e.Item.FindControl("Radio7");
RadioButton r8=(RadioButton)e.Item.FindControl("Radio8");
RadioButton r9=(RadioButton)e.Item.FindControl("Radio9");
//再判断r5....r9
//怎么不用RadioButtonList呢
}
}