Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
I have dropdown that is filled by country
on selectindexchange of country it populates city dropdown

as user change country from dropdown selecindex event get fired every time to
populate city

it occurs 10000 times per day ( some time server takes 30 sec to 1 min )

is there any solution to controll selectindex change event of dropdown every time ?
or any better solution ?

thanks
Posted
Comments
I.explore.code 10-Oct-12 15:29pm    
I am not quite sure I understand your question. What do you mean by "control selected index changed event"? Can you please use "Improve Question" to add some details? perhaps your code as well.

I see. It's way too easy to "AJAX the performance down". Just design it better. Don't do it on this event. Create a separate control (button?) which will only invoke request if all or most of data is already selected/entered. It could be possible even through the Web form, if designed accurately, having both user experience and performance in mind.

It's hard to help with a proper design more, without having full description of the problem, goals, use cases, etc. But I know for sure how amazing could be the effect of simple goal-oriented design.

—SA
 
Share this answer
 
Comments
I.explore.code 10-Oct-12 15:41pm    
do u reckon its the viewstate size that's the source of his sorrows?
Sergey Alexandrovich Kryukov 10-Oct-12 16:14pm    
I think it's the frequency of redundant postbacks.
--SA
I.explore.code 10-Oct-12 16:19pm    
oh u mean if cities get fetched for the first time you select a country, they should be somehow cached so that they don't have to be fetched from the DB again?
Sergey Alexandrovich Kryukov 10-Oct-12 16:37pm    
I don't know how quite exactly... it would be good if OP shows some code sample, to avoid redundant guesswork.
--SA
fjdiewornncalwe 10-Oct-12 16:36pm    
+5. Good Advice
Hi,

I understand your question, I do not know if it will work or not just a suggestion I can give that, while populating the country list you should populate the state dropdown there and then store the individual data tables into some view state variables. Then according to the selected country you can assign the data table from session variable to that state drop-down.

Thanks
Tapan kumar
 
Share this answer
 
I dont know
I dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont knowI dont know
 
Share this answer
 
Comments
prashant patil 4987 9-Jan-13 0:44am    
if you don't know the answer, then do write anything inside solution block.
and don't do such a stupid things.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900