ASP.NET HTML 控件 ArrayList RadioButtonList
asp.net html 控件 arraylist radiobuttonlist
<script runat="server">
sub page_load
if not page.ispostback then
dim mycountries=new arraylist
mycountries.add("norway")
mycountries.add("sweden")
mycountries.add("france")
mycountries.add("italy")
mycountries.trimtosize()
mycountries.sort()
rb.datasource=mycountries
rb.databind()
end if
end sub
sub displaymessage(s as object,e as eventargs)
lbl1.text="your favorite country is: " & rb.selecteditem.text
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:radiobuttonlist id="rb" runat="server"
autopostback="true" onselectedindexchanged="displaymessage" />
<p><asp:label id="lbl1" runat="server" /></p>
</form>
</body>
</html>
sub page_load
if not page.ispostback then
dim mycountries=new arraylist
mycountries.add("norway")
mycountries.add("sweden")
mycountries.add("france")
mycountries.add("italy")
mycountries.trimtosize()
mycountries.sort()
rb.datasource=mycountries
rb.databind()
end if
end sub
sub displaymessage(s as object,e as eventargs)
lbl1.text="your favorite country is: " & rb.selecteditem.text
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:radiobuttonlist id="rb" runat="server"
autopostback="true" onselectedindexchanged="displaymessage" />
<p><asp:label id="lbl1" runat="server" /></p>
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages HTML 表单
- ASP.NET Web Pages PHP
- ASP.NET Razor 语法
- ASP.NET Razor VB 逻辑
- ASP.NET MVC 数据库
- ASP.NET Web 页面
- ASP.NET 服务器控件
- ASP.NET ViewState
- ASP.NET Calendar 控件
- ASP.NET DropDownList 控件
- ASP.NET Table 控件
- WebSecurity RequireRoles 方法
- HTML Image 2
- HTML InputHidden
- HTML InputRadiobutton
- HTML Table
- ASP.NET HTML 控件 Radiobutton
- ASP.NET HTML 控件 用 重复
- ASP.NET HTML 控件Table 2
- ASP.NET HTML 控件 RequiredFieldValidator