Subscribe

RSS Feed (xml)

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”
Namespace=”Microsoft.Web.UI.WebControls”
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”>
</ie:Toolbar>

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>” />
</iecontrols:Toolbar>

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.

No comments:

Archives

Variety in the Web World