dropdownlistvalue.aspx
来自「asp.net技术内幕的书配源码」· ASPX 代码 · 共 30 行
ASPX
30 行
<%@ Page Language="C#"%>
<script runat=server>
void Page_Load(Object sender , EventArgs e)
{
if (! IsPostBack ) {
dropCategory.Items.Add( new ListItem( "Country Music", "country" ) );
dropCategory.Items.Add( new ListItem( "Rock Music", "rock" ) );
dropCategory.Items.Add( new ListItem( "Classical Music", "classical" ) );
}
}
</Script>
<html>
<head><title>DropDownListValue.aspx</title></head>
<body>
<form Runat="Server">
<asp:DropDownList
ID="dropCategory"
Runat="Server"/>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?