Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-18
2
Medium Priority
?
1,131 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

618 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