Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.5
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 31-Jan-12 8:49am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 31 Jan 2012
Copyright © CodeProject, 1999-2014
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