I used Ajax and Javascript when I made an interface yesterday.
Ajax is also used for a while, and it is called the anthem under dot net. Several problems are encountered during use: When an anthem button triggers a send-back event, if page-level Javascript is loadedCodeFor example, in the pop-up dialog box, this JavaScript effect is not allowed. Later I thought about this. Ajax does not send back pages, so after clicking the button, the page does not send back, And the pop-up prompt dialog box does not work, so I set the button back to the ASP control.
To control the display and hiding of buttons, I used JavaScript to control them, and I used the master page again. So I had trouble loading the onload event of the body, after checking the Internet for half a day, I found a way to use such a code implementation and add the code to the page_load event:
Page. registerstartupscript ("", "<SCRIPT> document. Body. onload = hidebutton (); </SCRIPT> ");
In this way, the onload event of the body is loaded in the background.