ASP.NET HTML 控件 SortedList RadioButtonList 1
asp.net html 控件 sortedlist radiobuttonlist 1
<script runat="server">
sub page_load
if not page.ispostback then
dim mycountries=new sortedlist
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 sortedlist
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>
相关文章
- ASP.NET Web Pages HTML 表单
- ASP.NET Web Pages 对象
- ASP.NET Web Pages 文件
- ASP.NET Web Pages WebGrid
- ASP.NET Web Pages PHP
- ASP.NET Web 的 C# 和 VB 实例
- ASP.NET 实例
- ASP.NET ValidationSummary 控件
- ASP.NET HyperLink 控件
- ASP.NET Image 控件
- WebSecurity GetCreateDate 方法
- WebSecurity IsConfirmed 方法
- WebSecurity Login 方法
- AdRotator
- ASP.NET HTML 控件 Hyperlink
- ASP.NET HTML 控件 Image
- ASP.NET HTML 控件 Label
- ASP.NET HTML 控件 linkbutton
- ASP.NET HTML 控件 Literal
- ASP.NET HTML 控件 CompareValidator 2