how to find masterpage radmenu itemtemplate linkbutton click event in its childpage

Posted by Ramakrishna188 under ASP.NET on 12/31/2012 | Points: 10 | Views : 2106 | Status : [Member] | Replies : 2
Hello all
In my masterpage have radmenu in this radmenu i have taken 3 linkbuttons, how to find one linkbutton in childpage .please tell me any one.


Thanks




Responses

Posted by: Baimey on: 12/31/2012 [Member] Starter | Points: 25

Up
0
Down
Please try this
On the content page Pageload function

Button b=MasterPage.findCotrol("MasterButton1");

b.click+=new eventHandler(eventname);


Please Mark as Answer If this Helps

Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 12/31/2012 [Member] Starter | Points: 25

Up
0
Down
Else

In your master page's code behind replace the protected keyword on the event handler to public.

public void LinkButton1_Click(object sender, EventArgs e) { //Do Stuff Here }

In the code behind for the content page call the Master event handler as follows

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
this.Master.LinkButton1_Click(sender, e);
}


Please Mark as Answer If this Helps

Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response