?
Solved

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

Posted on 2011-02-18
2
Medium Priority
?
1,130 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
informaniac earned 2000 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

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

762 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