Reputation: 553
3262 Points
662 Posts Need suggestions
17 hours, 13 minutes ago|LINK
I have an insert data page, having a drop down on the page items are filling from SQL Data Source (using code behind) I need to apply some filter to chop out certain values from Drop Down (user will select some radio buttons and then apply the filter, when filter applies, it will remove the unwanted items from drop down)
Now I dont know what is best procedure, I have done: 1) Using AJAX update panel, so when the user clicks on Apply, I am re-generating query and re-binding the drop down list) so it involves server round trip, every time user clicks on apply button. The best thing about this is, if user wants to insert records one by one, then user does not have to apply filter agian and again (once applied it will only show the filtered values after each record insertion)
2) Using client side javascript i have achieved the same but big problem here is that once a record is inserted, the page will refresh, and thus the drop down will show all the UN-Filtered values again
I need suggestions on which techinque I should follow in this regard, plz help
Upvotes: 0
Views: 93
Reputation: 72
Using ajax is the best option, but in sql you create a stored procedure, so that it might reduce the time of regenerating query.
Upvotes: 1