This is written today.CodeThe problem is: the server button event I added in the pop-up layer is not triggered in the pop-up layer?
View code
During debugging, the server event of btnadd is not triggered ..
After checking the information on the Internet, I found that the pop-up layer jumped out of the form form1 after being created by jquery, and all events on the server could not be executed.
Solution:
1. The setting button is not resolved to submit, and usesubmitbehavior = "false"
2. Use JS latency. click the button to close the pop-up layer before submitting the form.
Dialog. Close (); setTimeout (Function() {$ ("# Form1"). Submit () ;}, 10 );
3. When the pop-up layer is opened, append the pop-up layer to the form.
VaR $ dig = $ ("# adddiv"). Dialog ('open ');
$ Dig. Parent (). appendto (jquery ("form: First "));
1$ ('# Btnadd'). Click (Function(){2 Dialog. Close ();3SetTimeout (Function() {$ ("# Form1"). Submit () ;}, 10);4});