ASP.NET HTML 控件 XML RadiobuttonList
asp.net html 控件 xml radiobuttonlist
<%@ import namespace="system.data" %>
<script runat="server">
sub page_load
if not page.ispostback then
dim mycountries=new dataset
mycountries.readxml(mappath("countries.xml"))
rb.datasource=mycountries
rb.datavaluefield="value"
rb.datatextfield="text"
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>
<script runat="server">
sub page_load
if not page.ispostback then
dim mycountries=new dataset
mycountries.readxml(mappath("countries.xml"))
rb.datasource=mycountries
rb.datavaluefield="value"
rb.datatextfield="text"
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 文件夹
- ASP.NET Web Pages 帮助器
- ASP.NET Web Pages – 发布
- ASP.NET Razor VB 变量
- ASP.NET MVC 控制器
- ASP.NET MVC 视图
- ASP.NET MVC 数据库
- ASP.NET Web 服务器控件
- ASP.NET AdRotator 控件
- ASP.NET BulletedList 控件
- ASP.NET Table 控件
- ASP.NET XML 控件
- WebSecurity ChangePassword 方法
- WebSecurity Login 方法
- HTML Button
- ASP.NET HTML 控件 Label
- ASP.NET HTML 控件 linkbutton
- RadiobuttonList
- ASP.NET HTML 控件 Table
- ASP.NET HTML 控件 RequiredFieldValidator