I am looking for a JavaScript modal dialog solution for asp.net, jquery UI dialog seems good but it move dialog container to bottom of body tag. I changed the dialog code to stay dialog to asp.net form but still it's out of updatepanel.
我正在为asp.net寻找一个JavaScript模式对话框解决方案,jquery UI对话框看起来不错,但它将对话框容器移动到body标签的底部。我更改了对话框代码以保持对话框到asp.net表单但仍然没有更新面板。
Is there any solution or more compatible dialog that doesn't break asp.net form lifecycle?
是否有任何解决方案或更兼容的对话框不会破坏asp.net表单生命周期?
Thanks
谢谢
3 个解决方案
#1
3
Why not put the UpdatePanel inside the dialog container?
为什么不将UpdatePanel放在对话框容器中?
#2
24
When jquery creates a dialog its appends the dialog div to the body tag. And this effectively moves it outside the form tag and hence no post back. The solution is trivial and this blog http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with-aspnet-and.html explains it with example.
当jquery创建一个对话框时,它会将对话框div附加到body标签。这有效地将其移动到表单标签之外,因此没有回发。解决方案是微不足道的,本博客http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with-aspnet-and.html用示例解释了它。
#3
1
While I'm not sure that I know precisely what you are asking, Dave Ward has a couple of nice articles on this: http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/ and http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/. Both articles use the jQuery BlockUI plug-in.
虽然我不确定我是否确切地知道你在问什么,但Dave Ward有一些很好的文章:http://encosia.com/2008/10/11/using-jquery-to-display-a- modal-updatepanel-confirmation /和http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/。这两篇文章都使用了jQuery BlockUI插件。
#1
3
Why not put the UpdatePanel inside the dialog container?
为什么不将UpdatePanel放在对话框容器中?
#2
24
When jquery creates a dialog its appends the dialog div to the body tag. And this effectively moves it outside the form tag and hence no post back. The solution is trivial and this blog http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with-aspnet-and.html explains it with example.
当jquery创建一个对话框时,它会将对话框div附加到body标签。这有效地将其移动到表单标签之外,因此没有回发。解决方案是微不足道的,本博客http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with-aspnet-and.html用示例解释了它。
#3
1
While I'm not sure that I know precisely what you are asking, Dave Ward has a couple of nice articles on this: http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/ and http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/. Both articles use the jQuery BlockUI plug-in.
虽然我不确定我是否确切地知道你在问什么,但Dave Ward有一些很好的文章:http://encosia.com/2008/10/11/using-jquery-to-display-a- modal-updatepanel-confirmation /和http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/。这两篇文章都使用了jQuery BlockUI插件。