dropdownlist1_vb.aspx

来自「一些标准控件的举例说明」· ASPX 代码 · 共 42 行

ASPX
42
字号
<html>
<head>

    <script language="VB" runat="server">

        Sub SubmitBtn_Click(sender As Object, e As EventArgs)
            Label1.Text="You chose: " + DropDown1.SelectedItem.Text
        End Sub

    </script>

</head>
<body>

    <h3><font face="Verdana">DropDownList Example</font></h3>

    <form runat=server>

        <asp:DropDownList id=DropDown1 runat="server">
            <asp:ListItem>Item 1</asp:ListItem>
            <asp:ListItem>Item 2</asp:ListItem>
            <asp:ListItem>Item 3</asp:ListItem>
            <asp:ListItem>Item 4</asp:ListItem>
            <asp:ListItem>Item 5</asp:ListItem>
            <asp:ListItem>Item 6</asp:ListItem>
        </asp:DropDownList>

        <asp:button text="Submit" OnClick="SubmitBtn_Click" runat=server/>

        <p>
        
        <asp:Label id=Label1 Font-Names="Verdana" font-size="10pt" runat="server">
          Select a value from the list
        </asp:Label>

    </form>

</body>
</html>


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?