This is a migrated thread and some comments may be shown as answers.

how to record the button clicked state and use it in usercontrol

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amy Liu
Top achievements
Rank 1
Amy Liu asked on 31 Aug 2011, 12:41 AM
Hello!

I used the code( tabs and grid) in sales dashboard. Now I want to record the three buttons (search, reset, clear) clicked state so that I can use it in the user control . When three buttons clicked then I will always get data from database and for other postbacks I only use session variable.

How could I do it? I used session to record the clicked state and pass it to usercontrol property. but I don't think it will work as when other postback the session still hold the clicked( true) value.

Thanks for any help in advance!

Amy

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 03 Sep 2011, 07:47 AM
Hi Amy,

You could make a check on each Page_Load to see which control triggered the postback and if it was not one of the buttons in question, clear the session values. You can see how to write a method which does this check at the following address:
http://ryanfarley.com/blog/archive/2005/03/11/1886.aspx

Regards,
Tsvetina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Amy Liu
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or