The request duration increases every time the refreshable panel is reloaded

In an ASP.NET web application, I have a page with an update panel. In this update panel, the user can click the icon to add or remove controls to the relay.

I put a breakpoint in the Page.Load of the refresh panel and check the HttpContext.Current.Request.ContentLength every time the refresh bar is used. The request grows in size each time a request is sent.

The funny thing is, it even grows in size when the user removes the controls (so the page becomes "lighter" again).

It ends up giving me the following error: max request length.

Internet solutions suggest increasing the maximum RequestLength. This is not an option, because I will still reach the maximum.

I even noticed that the request length is increasing exponentially.

Has anyone had the same experience?

+2


source to share


3 answers


you are probably constantly adding attributes to your controls. Something like on page_prerender buttonSave.Attributes ("onclick") + = "this.className = 'buttonhide';"



+2


source


Off the top of my head, it looks like you might run into the ViewState issue here. If the length is increasing no matter what happens, I suspect that items are being added to the ViewState and not removed. The funny thing is, many times you don't need ViewState, but people leave it on.



+1


source


It looks like you have a static link at the request level. I've seen this before on the base page. What happens is that nothing can be eliminated and it just grows and grows.

0


source







All Articles