When postback occurs, multiple tables are retrieved to get 6 different datasources for my dropdownlists in the page.
The approximate total number of rows of the 6 tables are about 800 to 900. Depending on how much the user uploads, they can contain more than thousands of rows.
I need the selectedindexchanged event since option A will have different records from option B.
I tried the following...
1. I queried all the rows containing both option A and option B. I added a column (eg. TYPE) as indicator if it is for option A or B. Then in my program, I store it in a viewstate. When the selectedindexchanged event is fired, I store the viewstate in a dataview and filter it by the value of the radio button which checked property is set to true. So if option A is selected, all rows with type A is filtered in the dataview and that dataview is used as the datasource for one of my dropdownlists. Other dropdownlists do not need filtering.
2. I also tried calling roundtrips to server on every postback caused by selectedindexchanged. So once the event is fired, I call the stored procedure sending data whether to query for rows for option A or B.
3. I also tried, querying option A and B together but storing them at different tables. When it is retrieved with a dataset, each tables are stored in different viewstates.
Okay, my problem is this... it takes a lot of time. In localhost, it only takes about 2 to 3 seconds to load after every postback caused by the selectedindexchanged event but when I published it to the server, it takes 10 to 12 seconds which can make the user impatient. Imagine that you need to wait for that much time just because you changed the selected radio button. It really sucks.
So my problem mainly lies on how I can improve performance. Should I try different approach in loading tables as datasource every time radiobutton is selected?
I have read that large data stored in a viewstate can slow down the page.
This post has been edited by November-06: 22 August 2012 - 01:27 AM