Home >Web Front-end >JS Tutorial >Quick solution to server-side control failure after jquery dialog open_jquery
jquery dialog provides us with a very beautiful and practical dialog box, which is much easier to use than the monotonous alert, confirm, and prompt.
When using jquery and .net to jointly develop, after directly calling the open of jquery dialog, all server-side controls are invalid and the corresponding background code cannot be executed. It’s just because jquery adds the dialog to the body by default, instead of the original server-side form
Solution:
1. You can call $("#dialog").parent().appendTo("form:first") before opening the dialog, and add the content in the dialog to the server-side form.
2. Modify the js file of jquery and add the code to the form instead of the body.