Postback not working in an update panel having validators

Postback not working in an update panel having validators

March 26, 2008 23:47 by pradeep.mishra

Problem: Try creating one form inside an update panel. Put some validators like RequiredFieldValidator etc. Also put in LinkButton insite the update panel. You will notice when you click on the linkbutton nothing happens.

Reason: When you try to submit the form or doing postback, a few javascript client side functions are raised due to validators and due to some error validation fails and postback event is not raised. 

Solution: There is some problem with the code validators have been written. Check the following post http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

So untill some windows update is not release you're stuck with it. However there is a work around with some limitations. Set the enableClientScript = "false" for all validators. This will disable the client validation and post back event is raised. Since any way you are using update panel, the validation will occur on server side and you will get the same result and without noticeable delay. With this work arround you are losing the client validation but I think still it's okay because you will still be able to use the validators inside update panel. 

Hope this helps! 


Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5