Access Master Page control in Content Page and Process Events

<p>

Hi All,

At My Master Page , I have TreeView control and I am binding this treeview from one of my content page. Which is fine.

Now At the same content page I want to detect the click event on the treenode and accessing selectedNode. How do I do that

Which Event I need to use at my content page.

Please suggest me.

Basically I want to retrieve my TreeNode ID. As in case of TreeView I know the id (TreeView name) so I can find my treecontrol but here selected TreeNode can be anything and depend on Selected TreeNode value I will be showing data in my user interface.

thanks in advance.

</p>

0
vivek_cs
6/24/2008 1:46:43 PM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

1 Replies
855 Views

Similar Articles

[PageSpeed] 22
Get it on Google Play
Get it on Apple App Store

Hi,

This seems a duplicated post.

You have post them here, try to refer these two threads :


Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Amanda
6/26/2008 3:33:48 AM
Reply:

Similar Artilces:

Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error? The solutions I have seen either don't apply or don't work.  Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %> <%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %> <%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...

ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have:  I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...

Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.   Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) Hi Joeri Pansaerts, I am receiving the same error as the one posted her...

accessing controls in master page and adding event to content page
Hi  I've currently got a control on my master page and i'm trying to write an even on the content page that fires when the button is clicked, I don't think it is working though. Can someone help? The code is below:  masterpage <asp:ImageButton id="imgButton" runat="server"/> code behind Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load, Me.Load Public ReadOnly Property lnkbFromMasterPage() As ImageButtonGetReturn imgButtonEnd GetEnd Property  content page code behind: Public Sub Page_Load(ByVa...

Need to access a Label Control on the Master Page from a user control attached to a content page
Hello all, I have a master page (say  site.master)  with a status Label in it. I have a content page ( say content.aspx)  that has a user control (say usercontrol.ascx). One of the Button Click Events in the usercontrol.ascx needs to pass on some text onto the status label on the masterpage(LabelStatusMsg) and display it. I have been able to do this directly off a content page (content.aspx) by using the following code (VB)  on the master page <%@ MasterType virtualpath="~/site.master" %> and Dim mpLabel As Label = CType(Master.FindControl("LabelStatusMsg"),...

Accessing master page controls from content page
Hello,Here's a snippet from my listing.master page:<%@ master Language="C#" %>     public string Listing_Name    {        get { return lis_name.Text; }    }    protected void Page_Load(object sender, EventArgs e)    {       lis_name.Text = "Hello World"    } ---------------------------------------------------------------------------------------------------------------In my content page, Master.Listing_Name shows blank, why?<...

Accessing Content Page Control From Master Page
I'd like to access the value of a control residing on a content page from the associated master page. Can anyone point me in the right direction?   Thanks When you know the classname of your page, use: (in VB.NET) CType(Page, classname).ControlID.propertyName But this code will go wrong on all the other pages, so you have to check on which page you are. This being said, I advise you to consider another approach.Your master page should not use code that depends on the design of a particular content page. Your content pages should depend on your master page, not the other ...

Accessing Controls Content Pages from Master Page
how do i access controls content pages from master page?Its all about coding! I would raise an event from the master page and handle it on the content page.  You can commuicate any data through customized event args.  This article explains in detail how to raise and consume an event: http://msdn2.microsoft.com/en-us/library/9aackb16(VS.80).aspx  HTH,Phillip Williams,http://www.webswapp.com Let's say your master page has a textbox whose ID is MasterTextBox. TextBox tb = Page.Master.FindControl("MasterTextBox") as TextBox;...

Access Content Page Control from Master Page
I use Master page in my application. i want to access the content page control (Text Box)  from master page and change the control (Text Box) value. i cant find the text box by using Findcontrol also Let’s turn to the FindControl documentation on MSDN. FindControl searches the current naming container for the specified server control. Master.FindControl("ContentPageHolder1").FindControl(TextBox) Reading this nice article.http://odetocode.com/Articles/450.aspx   MPI never desire to converse with a man who has written more than he hasread. -Samuel Johnson, lexic...

Content page accessing master page controls?
I'm probably that much of a noob that I've deviated from the path authors of ASP.NET 2.0 thought of how master and content pages should off been used... Looking from the outside it seemed logical to me that (even on this website) a search text box should be part of a master page and a page that displays results should be a content page... So the problem I'm having (if my hunch about that search textbox control in the header of say even this very website being part of a master page, and result page that subsequently loads underneath the header after you click go bei...

Problem Accessing Page Controls in a page that has a master page.
Hi,  I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).  The controls structure is..                                 MasterPage  >  PlaceHolder > MyPage.aspx &n...

How to access a control in the Content Page from javascript in Master Page?
How do I access a control in the Content Page from javascript in Master Page? Say, I have a dropdown list 'CountryDDL' in my Content Page. When I click on a button in the Content Page, I call a javascript function. The javascript file is included in the master page. From within this javascript function, I have to access CountryDDL and find the selected index etc... Because of Master page - content page hierarchy, document.getElementById('CountryDDL') doesnt seem to work. Is there  any alternate approach? use  document.getElementById('<%Countr...

Accessing Master Page Control event from a child page
Hi, I was wondering if it is possible to access Master Page Control events from a child page. What I mean is, I have a button on the master page, I need to modify its onclick event on a particular child page, is there a way to do it? I know how to access the control attributes, i.e.: Dim Button as Button = CType(Master.FindControl("Button1"), Button), but I can't figure out how to accss its events. Please help, Many thanks, Alexi Got it... Page load event of the content page:         Dim mp As MasterPage = CType(Page.Master, Maste...

accessing repeater control in master page from content page
Hello,In my master page, I have a repeater control named "repJobs" and I made it public like so:    public Repeater Rep_Jobs    {        set         {             repJobs.DataSource = value;            repJobs.DataBind();        }    }    From my content page, I tried to assign a datasource to it (a DataTable named "dt") ...

Web resources about - Access Master Page control in Content Page and Process Events - asp.net.navigation-controls

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Is Hillary Clinton sorry she reacted to the San Bernardino massacre with a call for more gun control ...
... "Gun safety" has traditionally meant handling your guns safely, but now it's supposed to mean what has more commonly been called "gun control." ...

more pics from Ground Control Touring 15th anniversary: Woods, Kurt Vile, Parquet Courts, Beach Fossils ...
... Parquet Courts / Woods & Kurt Vile / Beach Fossils @ Webster Hall 12/2/2015 We already posted a review and set of pictures from Ground Control ...

Trump pushes alternative to gun control after attack
Billionaire hits back against New York Times editorial calling for stronger gun control in wake of San Bernardino massacre

Liberals Soft On Bomb Control? Are You Sure You Want To Go There, Marco?
... reports: Appearing on Fox & Friends , 2016 GOP presidential contender Marco Rubio hammered at Democrats for proposing additional gun control ...

Violent Crime In California Is Above National Average Despite Strict Gun Control
Violent Crime In California Is Above National Average Despite Strict Gun Control

Open thread for night owls: First U.S. birth control clinic lasted just 10 days before being raided
... Parenthood Only Lasted for 10 Days but Started a Revolution . An excerpt: During her time in Europe, Sanger had seen Norwegian birth control ...

Facebook Gives Users More Control Over Viral Content In News Feed
Facebook is updating its algorithm to give users more control over how high viral content appears in their News Feed.

Gun buys, applications likely to surge as pols push gun control laws
Gun buys, applications likely to surge as pols push gun control laws

New York Times Puts Gun Control Editorial on Page 1
New York Times calls for more gun regulation in first Page 1 editorial in 95 years

Resources last updated: 12/6/2015 2:48:53 AM