Click here to Skip to main content
15,883,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we have requirement like we have to show some questions to users.when users rediecting to this page it will show the all parents questions.the parents question can have child question.the child question can go up to sixth level.on selection of yes or no on parents question it will show the child question.

To implement this requirement I am using nested repeater controls up to 6th level.means repeater inside repeater six times.In the itemTemplate of each repeater I am using the user controls.the user controls contains some label and one dropdownlist.this user controls is used in the item template of each nested repeater.on selected change event of dropdown of the parent questions we are getting the child question from the database and binding the nested repeater.

Functionality wise its working fine.The problem I am facing is the size of the view state.Even if the repeater contains a single data and no child questions the size of the page is more than 30 MB.The perfermancs of the page is very slow.on selectedindex change its taking more than 2 min.

I tried to store the view state on the file system of the server using the compression logic.the perfermance of the page drastically reduced.it was taking 50 sec to get the child questions.Tha databse object is purly tuned and no problem with the stored proc.
the stored proc hardly taking 2 sec to get the child questions.

I tried to put the update panel inside the nested repeater.the perfermance is same.as the page contains almost 100 qs client wants to improve the perfermancs.

can anybody help me out on this ..why the size of the view state is more in repeater evenif it contains one data.any help or any approach is much apprecited.
Posted

1 solution

Have you looked at ViewState: Various ways to reduce performance overhead[^]? There are a million articles on the topic.

Better yet, set EnableViewState = false on all controls (or even the page if possible) that don't actually require viewstate.

Use the ASP.NET trace output to view the viewstate size and, if you do need some viewstate enabled, at least you'll be able to see which controls are contributing to the viewstate bucket and disable viewstate for all but the ones that really need it.
 
Share this answer
 

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