ASP.NET HTML 控件 Hashtable RadioButtonList 1
asp.net html 控件 hashtable radiobuttonlist 1
<script runat="server">
sub page_load
if not page.ispostback then
dim mycountries=new hashtable
mycountries.add("n","norway")
mycountries.add("s","sweden")
mycountries.add("f","france")
mycountries.add("i","italy")
rb.datasource=mycountries
rb.datavaluefield="key"
rb.datatextfield="value"
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 hashtable
mycountries.add("n","norway")
mycountries.add("s","sweden")
mycountries.add("f","france")
mycountries.add("i","italy")
rb.datasource=mycountries
rb.datavaluefield="key"
rb.datatextfield="value"
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>
相關(guān)文章
- ASP.NET Web Pages WebMail 參考手冊
- ASP.NET Razor 標記
- ASP.NET Razor 語法
- ASP.NET MVC 文件夾
- ASP.NET MVC 安全
- ASP.NET MVC HTML 幫助器
- ASP.NET 數(shù)據(jù)庫連接
- ASP.NET 導(dǎo)航
- ASP.NET Literal 控件
- ASP.NET Style 控件
- WebSecurity CreateAccount 方法
- WebSecurity GetCreateDate 方法
- WebSecurity Logout 方法
- HTML Table
- AdRotator
- ASP.NET HTML 控件 Calendar 2
- ASP.NET HTML 控件 Calendar 3
- ASP.NET HTML 控件 用 重復(fù)
- ASP.NET HTML 控件 Textbox
- ASP.NET HTML 控件 RequiredFieldValidator