Posted: 12/4/2011
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
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
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.