Adding Controls to a Toolbar Control through Code (VB.net)
<%@ Page Language=VB Debug=true %>
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="IEControls"
Namespace="Microsoft.Web.UI.WebControls"
Assembly ="Microsoft.Web.UI.WebControls"
%>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
If (WeekDay(Today())) = 2 Then
Dim MyTBL = New ToolBarLabel
MyTBL.Text = "2:00 PM Metting Today!"
MyTBL.ToolTip = "The weekly meeting is on for today."
MyTB.Items.Add(MyTBL)
End If
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Adding Controls to a Toolbar Control through Code</TITLE>
</HEAD>
<BODY LEFTMARGIN="40">
<form runat="server">
<IEControls:toolbar
id="MyTB"
runat="server"
>
</IEControls:toolbar>
</form>
</BODY>
</HTML>
Related examples in the same category