ASP.NET HTML 控件 ArrayList DropDownLis
asp.net html 控件 arraylist dropdownlis
<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()
dd.datasource=mycountries
dd.databind()
end if
end sub
sub displaymessage(s as object,e as eventargs)
lbl1.text="your favorite country is: " & dd.selecteditem.text
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:dropdownlist id="dd" 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()
dd.datasource=mycountries
dd.databind()
end if
end sub
sub displaymessage(s as object,e as eventargs)
lbl1.text="your favorite country is: " & dd.selecteditem.text
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:dropdownlist id="dd" 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 WebGrid
- ASP.NET WebPages 帮助器参考手册
- ASP.NET Razor C# 循环和数组
- ASP.NET 母版页
- ASP.NET RangeValidator 控件
- ASP.NET AdRotator 控件
- ASP.NET CalendarDay 控件
- ASP.NET Label 控件
- ASP.NET RadioButtonList 控件
- WebSecurity IsAuthenticated 属性
- WebSecurity GeneratePasswordResetToken 方法
- WebSecurity InitializeDatabaseConnection 方法
- WebSecurity Login 方法
- HTML Anchor
- HTML Table
- ASP.NET HTML 控件 Calendar 3
- ASP.NET HTML 控件 DropdownList
- ASP.NET HTML 控件 Validationsummary