Loading ...

Event handling in another page from the MasterPage

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  advanced topics   » Event handling in another page from the MasterPage

Event handling in another page from the MasterPage

Posts under the topic: Event handling in another page from the MasterPage

Posted: 12/4/2011

Lurker 10  points  Lurker
  • Joined on: 12/4/2011
  • Posts: 2

Hello

I have a check box in the Master Page (StatMaster.master)

and I have another Page that’s inherits the master page (Stat.aspx) conatins statistics chart.

the chart is in PageLoad

what I need to do :

If the user checked the checkBox in the master page , The chart will refresh and display different result.

I could not use the checkbox in Stat.aspx How can I do that?

P.s: Im using Asp.net and VB not C#

Thank you


Posted: 12/7/2011

Lurker 25  points  Lurker
  • Joined on: 12/6/2011
  • Posts: 1
  Answered

Hi There ,

             If I understand you correctly Checkbox control is in Master page.If it is so then it would be simple as you can access control of your master page in content pages by using property Contentpage objects Findcontrol property.once you get the control you can acheive the results.For an Example take this check box as html control.take one button control set display none property of this control to true and write a script on state page which will be invoke on the click of this checkbox and in script it will call the click event of button which you declared earlier and which is a server side control.and put your chart code on that button click event. I think this will solve your problem.


Posted: 3/31/2012

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391

You can always use FindControl. However, in case you have client-side charting control, maybe you can also use jQuery to find the rendered control and operate over it.


Page 1 of 1 (3 items)