I have a H1 tag in the body of my Parent Master Page. My content page is based on nested master page. I am trying to access the H1 tag in this content page using the code behind.
My site it built in asp.net 2.0 and C#.
In the Page_Load of my content page I am trying to access it like this>
HtmlGenericControl h1 = (HtmlGenericControl)Master.Master.FindControl("h1top");
h1.InnerText = "this is a test";
Didn't work throws an error
System.NullReferenceException: Object reference not set to an instance of an object.
at mysite.product.Page_Load(Object sender, EventArgs e) in http://server/TestsiteLatest/browse/product.aspx.cs:line 102
line 102 is h1.InnerText = "this is a test";
where am i making an error in writing the code.
Thanks and appreciate it