Register  |  Login

 Blog List
You must be logged in and have permission to create or edit a blog.
 View Blog
Oct 6

Written by: Usman Shabbir
10/6/2010 4:51 PM 

Hi All,

If you have ever used JQuery model popup with server side controls on it you might face problem when clicking a server button on it, That the server event is not fired when and hence you can not open perform any server activity inside that popup.

The reason is that JQuery models are designed in a way that they should contain a form tag as an server page but when the popup appears div gets out from document object model and gets attached to the end of page and hence it never contained a form tag which stops "runat=server" to work so server events didn't gets fired.

The solution is very simple just add the model popup to the parent form and you are done. i have also attached the sample code.

jQuery(function() {
var myDialog= jQuery("#DialogName").dialog({
// SET Properties here
// Adding Dialog to Parent form will do the Job

Also Take care of one thing that the addition of model dialog to page must b done inside the page it this is done in external javascript file it wont work.

Happy Coding.


Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Add Comment   Cancel