This is a common problem with jQuery / ASP.NET.
After you assigned your modal style
$(".modal-window").dialog({
modal: true
});
do it
$(".modal-window").parent().appendTo($("form:first"));
If you have several modal files on the page, I find that it does not work as expected, so in this case, when you call the open method in modal mode, do the following:
$('.modal-window').dialog('open').parent().appendTo($('form:first'));
If you want it to open automatically. You can add it immediately after assigning a model.
$(".modal-window").dialog({
modal: true
}).parent().appendTo($('form:first'));
Hope this helps,
Marco
Marko source
share