Solved

Access a H1 tag which is in parent master page from a content page

Posted on 2011-02-18
2
1,124 Views
Last Modified: 2012-05-11
Hello experts,

I have a H1 tag whose id is h1top in my parent master page like below. my site is bulit in asp.net 2.0 and C#
<div id="top">
           <div id="leftdot"></div>
           <div id="center">
             <h1 id="h1top" runat="server" class="h1top"></h1></div>
            <div id="rightdot"></div>
  </div>

Open in new window


Now I have a content page called items.aspx which is created from Nested masterpage whose parent masterpage includes the above H1 tag.

I would like to access this H1 tag from the content page items.aspx so I can add some text using the Innertext control programatically on page load

Thanks and appreciate it
0
Comment
Question by:niceoneishere
2 Comments
 
LVL 20

Accepted Solution

by:
informaniac earned 500 total points
ID: 34928039
HtmlGenericControl h1=(HtmlGeneriControl)this.Master.Master.FindControl("h1Id");h1.InnerText = "Text";
0
 
LVL 1

Author Closing Comment

by:niceoneishere
ID: 34943861
thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now