views:

318

answers:

4

We have a user who is having problems with a ASP.NET app. The user hasn't been available to gather many details, but at this point our best guess is that the PostBack is not occurring. Something is going wrong between when the user clicks the LinkButton and when the HTTP Request is supposed to be made.

(User does have JS enabled)

Beyond solving the immediate problem, it might be helpful for posterity to assemble the canonical list of things that can break PostBack behavior of ASP.NET controls.

+3  A: 

If you have say a button that has a postback event as well as a javascript event on click, if the javascript event that is fired returns false postback will be stopped.

Corey Sunwold
+2  A: 

I would first check that your <form> tags are well formed and that you don't have nested <form> tags. Both times I've debugged something to do with postback this turned out to be the problem. It's confusing because it's a browser dependent issue.

Spencer Ruport
This makes me wonder, does the app ever postback?
Corey Sunwold
A: 
  • a form with no method attribute, or method note being set to POST
  • an onsubmit event handler that does not return true
  • trying to submit the form programatically, but unable to locate the form by id as there is another element with the same id on the page
RedFilter
+1  A: 

Having a self-closing <script /> tag can stop postbacks occurring. Get the user to send you any javascript errors from their log. There is actually a decent JS debugger in IE8 (about the only good thing in it!).

Dan Diplo