Hi I am trying to find 3 controls on a content page;
I 'Label', which I could find
and a '<div>' and 'CheckBox' which I couldn't find.
<asp:Label runat="server" id="Label1" AssociatedControlID="CheckBox1" >
<div ID="div1" runat="server">
<asp:CheckBox ID="CheckBox1" runat="server" />
</div>
</asp:Label>
I could find the label, using this code...
Label lbl = this.Master.FindControl("MainContent").FindControl("Label1”) as Label;
And tried all of these to find the <div> and the same methods to try and find the checkbox...both unsucessfully
HtmlContainerControl div = this.Master.FindControl("div1”) as HtmlContainerControl;
HtmlContainerControl div = (HtmlContainerControl)this.Master.FindControl("MainContent").FindControl("div1");
HtmlContainerControl div = ( ...
Go to the complete details ...