使用无线电列表作为超链接 [英] Using Radiolist as Hyperlink
本文介绍了使用无线电列表作为超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想知道有人会成为我的原因吗,我有一个带有广播列表的网络表格.单选列表有两个选项,是和否,我希望如果用户选择是,它将打开另一个页面/网络表单.
这是我的html代码:
Hi there,
I wonder is anyone could be me out, i m have a webform with a radio list. The radiolist has two options YES and NO, i want it that if user selects YES it opens another page/webform.
Here is my html code:
<asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
Style="z-index: 190; left: 329px; position: absolute; top: 4px" ValidationGroup="WFGENPage">
<asp:ListItem>YES</asp:ListItem>
<asp:ListItem>NO</asp:ListItem>
</asp:RadioButtonList>
在此先感谢
Thanks in advance
推荐答案
使用OnSelectedIndexChanged
事件.
试试这个.
http://编程. top54u.com/Samples/ASP-Net-cs/Standard-Server-Controls-5/RadioButtonList-Control-OnSelectedIndexChanged-Event/Default.aspx [ http://programming.top54u.com/post/ASP-Net-RadioButtonList-OnSelectedIndexChanged- Event.aspx [ ^ ]
UseOnSelectedIndexChanged
Event.
Try this.
http://programming.top54u.com/Samples/ASP-Net-cs/Standard-Server-Controls-5/RadioButtonList-Control-OnSelectedIndexChanged-Event/Default.aspx[^]
http://programming.top54u.com/post/ASP-Net-RadioButtonList-OnSelectedIndexChanged-Event.aspx[^]
您可以在下面做一下
首先设置aoutopostback属性true
Hi you can do ilke below
at first set aoutopostback property true
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (RadioButtonList1.SelectedIndex == 0)
{
Response.Redirect("First.aspx");
}
else
{
Response.Redirect("Second.aspx");
}
}
您可以在下面尝试,
从用户调用ASP.NET页面方法控制 [ ^ ]
:)
You might try below,
Invoke a ASP.NET page method from a User Control[^]
:)
这篇关于使用无线电列表作为超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文