Click here to Skip to main content
12,299,581 members (48,244 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 10-Oct-12 9:20am
Comments
Aman.A 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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
Aman.A 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
Aman.A 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
Marcus Kramer 10-Oct-12 16:36pm
   
+5. Good Advice
Sergey Alexandrovich Kryukov 10-Oct-12 16:37pm
   
Thank you, Marcus.
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100