Question

I have a custom asp.net user control which has an update panel in it. In this update panel i have all the controls and content that are shown to the user. Amongst these controls there are two textboxes, which have AutoPostback = true. This is because when their value is changed, the structure of the page changes accordingly. This works as required, but when I modify the two textboxes in quick succession, the first autopostback works while the second one doesn't fire. It seems that while it is doing the first postback, any other attempted postbacks will be ignored. How can I work around this?

Was it helpful?

Solution

This behavior is by design. The usual approach is to use UpdateProgress control that disables the user input on the page while the postback is in process.

Alternatively you could add your own onchange event handlers that call __doPostBack() more intelligently (by using timers etc.) to avoid this problem for your specific scenario. You could also try aborting any postback is process before submitting a new one.

A resource that might be useful: http://www.dotnetcurry.com/ShowArticle.aspx?ID=176

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top