Solved

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

Posted on 2011-02-18
2
1,128 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 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

737 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