Creating a dynamic ASP.NET menu

Creating a dynamic ASP.NET menu

You can dynamically populate an ASP.NET menu control such as DropDownList or ListBox with entries from a database.

Before you begin, you must define a DataSet or other source of dynamic content for the menu. For more information, see Defining a recordset.

To insert a dynamic menu in an ASP.NET page:

  1. Open the ASP.NET page and position the insertion point where you want the menu to appear.
  2. Select Insert > ASP.NET Objects; then select asp:DropDownList or asp:ListBox.

    The form control’s dialog box appears.

  3. Complete the dialog box and click OK.

    For more information, see the following topics:

    • Setting the asp:DropDownList dialog box options
    • Setting the asp:ListBox dialog box options

Dreamweaver inserts the form control at the insertion point in your page. If you didn’t insert a form, Dreamweaver inserts one that includes a runat="server" attribute.

Related topics

  • Setting the properties of ASP.NET form controls
  • Making an existing ASP.NET menu dynamic


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Reference
Building ASP and JSP Applications Rapidly