Home > Articles

Custom Controls

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

3.10. Using the ToolBar IE Web Control

You want to implement a toolbar using the ToolBar IE Web Control.


The first step is to install the IE Web Controls from Microsoft.

The link to download and install these controls is as follows: http://msdn.microsoft.com/downloads/samples/ internet/default.asp?url=/downloads/samples/internet/asp_dot_net_ servercontrols/webcontrols/default.asp

Next, you need to add a reference to the Web Controls on your page:

<%@ Register TagPrefix="ieControls" 
Assembly="Microsoft.Web.UI.WebControls" %> 
<%@ import namespace="Microsoft.Web.UI.WebControls" %>

Then, you add the toolbar to your page:

<iecontrols:Toolbar id="myToolbar" runat="server">

Lastly, you add the buttons that you want to appear on your toolbar:

<iecontrols:Toolbar id="myToolbar" runat="server">
  <iecontrols:ToolbarButton Text="First Button" />
  <iecontrols:ToolbarSeparator />
  <iecontrols:ToolbarButton Text="<b>Second Button</b>" />


The toolbar control is a quick way to get a nice-looking toolbar working on your site. Notice in this example that you can even add rich content to the button text. This enables you to use HTML on your buttons. You can also set the ImageUrl property of the button tag to use an image as your button.

  • + Share This
  • 🔖 Save To Your Account