I just arrived at the company today and got onto MSN Messenger. Before I had time, I sent a Message and asked me a question, which is roughly like this: data needs to be bound to two dropdownlists (the data comes from the background database). The data in the two Dropdown lists is one-to-many, that is, when Dropdown1 is selected, different data will always appear in the corresponding Dropdown2, is it very simple and common application? The first thing that comes to mind is when Dropdown1's Selectchanged, PostBack, to get the corresponding data from the database and bind it to Dropdown2, the second Message is coming. It cannot be PostBack! I haven't written the specific code for a while. I thought about it. OK. Since PostBack is not available, I can save the data to the client during PageLoad and implement it through Javascript, how can I save the data to the client? I personally think that because Dropdown1 corresponds to the data in Dropdown2, we can consider using one-dimensional arrays and multi-dimensional arrays in Javascript. Download the specific code here
. The PostBack mechanism in the NET platform does bring great convenience to our development, but sometimes we should try to reduce unnecessary PostBack as much as possible, considering the problem of network speed (although it has entered the broadband era ), after page PostBack, users often need to wait for a while before loading the page. This is very intolerable for this customer. Therefore, during development, do not simply put all the functions in the server segment to run, consider as much as possible, and then make the best choice in the server segment and client.