<telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Office2010Blue" OnButtonClick="RadToolBar1_ButtonClick" EnableRoundedCorners="true" EnableShadows="true" Width="100%"> <ExpandAnimation Type="OutQuart" Duration="300"></ExpandAnimation> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> <Items> <telerik:RadToolBarButton> <ItemTemplate> <div style="margin: 0 5px 0 15px;width:620px;"> <asp:Label ID="lblCategory" runat="server" Text="CategotyText"></asp:Label> </div> </ItemTemplate> </telerik:RadToolBarButton> <telerik:RadToolBarDropDown Text="Sort"> <Buttons> <telerik:RadToolBarButton Text="New Arrivals"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Text="Unordered"> </telerik:RadToolBarButton> </Buttons> </telerik:RadToolBarDropDown> </Items> </telerik:RadToolBar>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Item As RadToolBarItem = RadToolBar1.Items(0)
Dim lbl As TextBox = TryCast(Item.FindControl("lblCategory"), TextBox)
lbl.Text = "Found"
End Sub
What am I doing wrong?