亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

ASP.NET SelectedIndex 屬性

定義和用法

SelectedIndex 屬性用于獲取或設置 DropDownList 中被選項目的索引號。

實例

下面的例子輸出了被選項目的文本:

<script runat="Server">
Sub GetName(obj As Object, e As EventArgs)
  lbl.Text = ddList.SelectedItem.Text
End Sub
</script>

<form runat="Server">
Select a name from the list:
<asp:DropDownList id="ddList" runat="Server">
  <asp:ListItem Text="Peter" />

  <asp:ListItem Text="Lois" />
  <asp:ListItem Text="Cleveland" />
  <asp:ListItem Text="Quagmire" />

  <asp:ListItem Text="Joe" />
</asp:DropDownList>

<asp:Button Text="Select"
OnClick="GetName" Runat="Server" />

<br />
Name is:
<asp:Label id="lbl" Runat="Server"/>
</form>

實例

從 DropDownList 中的一個項目取得文本