WebToolBar provides a template to use custom content.
This topic will show you how to create custom content.
To create custom content
- Right click WebToolBar control and choose Properties.
- Go to Commands and click the collection button.
- Add one ToolCommand and set Type to Custom.
- Right click on WebToolBar and select Edit Template >> ToolCommand
Items.
- Drag a standard ASP.NET Dropdownlist and a TextBox control.
- Configure the following value in CommandTemplate:
<CommandTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="text">
<asp:ListItem>(Select a Product)</asp:ListItem>
<asp:ListItem>WebToolBar</asp:ListItem>
<asp:ListItem>WebMenuBar</asp:ListItem>
<asp:ListItem>WebDesktopManager</asp:ListItem>
<asp:ListItem>Others</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox1" runat="server" CssClass="text">(Search)</asp:TextBox>
</CommandTemplate>
- Run the project.