Wednesday, May 3, 2017

List Box in ASP.NET

<body>
    <form id="form1" runat="server">
    <div>
        <asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1"
            DataTextField="Name" DataValueField="Name"></asp:ListBox>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:ExampleConnectionString %>"
            SelectCommand="SELECT * FROM [Bitu]"></asp:SqlDataSource>
    </div>
    </form>
</body>

No comments:

Post a Comment