Hi everyone,
I have to find a Control(a Table) in an aspx page with master page :
the Master page have this :
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
and int the child page :
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
</asp:Content>
I insert my Table in the Content2.
I used this code to get it :
protected void Ok_Click(object sender, EventArgs e)
{
Table tblForm = this.FindControl("MainContent").FindControl("formtable") as Table;
}
But it's null !
do you have any idea to resolve this problem ?
Thank you !