Ajax Tutorial for OpenFlashChart Control - Page 2
Page 1
View Demo
Now its time to put some logic behind these buttons. In our previous example we just assigned the URL property in the
page load:
We now want to add additional logic to modify the URL when one of the 3 buttons is clicked.
Lets add a name value pair of button to the url string. This will allow our data page to know what data we are
requesting:
Now we need to make 3 distinct changes to our chart in the Data.aspx page.
Notice the select case statement I have added to the page load. I now check the value of button
in the requesting URL. Based on the value (1-3) I change the apearance of the chart:
We now can change the data in the chart or the way it looks (I just changed the look to keep it simple).
Here are the results when you click the 3 different buttons:
Page 1