ComboBox Control in Ajax

This Blog demonstrate that we can select any item with the help of ComboBox Control.
  • 2814

Introduction : The ComboBox is similar to the AutoComplete Extender Control. The ComboBox control in contrast is initialized with set of items. In the Ajax ComboBox are used with Script Manager Control.ComboBox at a one time one item select it.

Step : 1 Open Visual Studio and select File Menu option.

  • Select ASP.NET WebSite.
  • Go to Solution Explorer and right click.
  • Select WebForm and click ok.
ASP-page1.gif
webforms 1.gif
 

Step : 2 Drag and Drop Control in Toolbox.

  • Drag ScriptManager, ComboBox in Ajax Control ToolKit.
  • Write a code.

Code :

  <title> my combox in ajax</title
>
</head>
<
body>
  <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:ComboBox ID="ComboBox1" runat="server">
            <asp:ListItem>raj</asp:ListItem>
            <asp:ListItem>amit</asp:ListItem>
            <asp:ListItem>anil</asp:ListItem>
            <asp:ListItem>sachin</asp:ListItem>
            <asp:ListItem>hi</asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:ComboBox>
    </div>
    </form
>
</body>
</
html>

Step : 4 Now Press F5 and run.
combo1.gif

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.