Set ViewState="false" for Progress.aspx

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Set ViewState="false" for Progress.aspx

Mike Lim

Hello

Was wondering if I can disable ViewState for Progress.aspx (which is derived from Brettle.Web.NeatUpload.ProgressPage)

I set EnableViewState="false" in progress.aspx and it seems ok.

I understand this is an issue with version 1.2. Wondering if this is still an issue with version 1.3?


Reason for doing this is to reduce page size. With ViewState enabled, Progress.aspx is about 3K (1.5K to 2K with compression)

With ViewState disabled, Progress.aspx is about 2K (< 1K with compression)

May not be much savings, but since this page is used to update upload progress status every second during upload, the total savings in bandwidth can be large

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set ViewState="false" for Progress.aspx

Dean Brettle
Administrator
Setting EnableViewState="false" in Progress.aspx is fine because it doesn't postback.  However, it probably won't reduce bandwidth as much as you think, because if the user has JavaScript, Progress.aspx will update the progress display using AJAX calls instead of full page refreshes for all but a few requests.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set ViewState="false" for Progress.aspx

Mike Lim

Using Fiddler tool, the browser is requesting Progress.aspx at regular intervals during upload.

Was testing this on http://www.brettle.com/Demo.aspx using IE 8

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set ViewState="false" for Progress.aspx

Dean Brettle
Administrator
I'm sorry.  You are absolutely correct.  It has been so long since I looked at that code that I forgot how it worked.  The AJAX calls are made to Progress.aspx.  Regardless, setting EnableViewState="false" on Progress.aspx should be fine.

FYI, if you really want to minimize the bandwidth used to display progress, see Using NeatUpload from JavaScript.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set ViewState="false" for Progress.aspx

Mike Lim

Thanks for the clarification and suggestion. Will look into it

Many thanks again. You rock! ;-)

Loading...