Prompt message displayed in the background

Source: Internet
Author: User

1. the prompt message method response. Write ("<SCRIPT type =" text/JavaScript "> alert ('the data you queried does not exist! '); </SCRIPT> "); // a prompt is displayed, but the page is blank. registerclientscriptblock ("tishi", "<SCRIPT type =" text/JavaScript "> alert ('data You queried does not exist'); </SCRIPT> "); // a prompt is displayed, but the page is blank. registerstartupscript ("tishi", "<SCRIPT type =" text/JavaScript "> alert ('data You queried does not exist'); </SCRIPT> "); // expired, // The prompt is displayed. The clientscript is not blank. registerclientscriptblock (this. getType (), "tishi", "<SCRIPT type =" text/JavaScript "> alert ('the data you queried does not exist! '); </SCRIPT> "); // a prompt is displayed, but the clientscript is blank. registerstartupscript (this. getType (), "tishi", "<SCRIPT type =" text/JavaScript "> alert ('the data you queried does not exist! '); </SCRIPT> "); // The prompt is displayed, and the page is not blank. // system must be introduced in vs2005. web. extensions. dllscriptmanager. registerclientscriptblock (this. btntishi, typeof (button), "tishi", "alert ('the data you queried does not exist! '); ", True); // The prompt is displayed, but the page is blank. scriptmanager. registerclientscriptblock (this, this. getType (), "tishi", "alert ('the data you queried does not exist! '); ", True); // The prompt is displayed, but the page is blank. This indicates pagescriptmanager. registerstartupscript (this. btntishi, typeof (button), "tishi", "alert ('the data you queried does not exist! '); ", True); // The prompt message is displayed. The page does not contain a blank scriptmanager. registerstartupscript (page, typeof (PAGE), "tishi", "alert ('the data you queried does not exist! '); ", True); // The prompt message is displayed. The page does not contain a blank scriptmanager. registerstartupscript (this, typeof (_ default), "tishi", script, true); // a prompt is displayed. The page is not blank. This indicates that the page // returns the confirm value in the background, the selected execution statement Block C # End: protected void page_load (Object sender, eventargs e) {If (! Ispostback) {This. btntishi. attributes. add ("onclick", "tishi ()") ;}} protected void btntishi_click (Object sender, eventargs e) {If (this. hidevalue. value = "1") {response. write ("success");} else {response. write ("failue") ;}} JS end: <SCRIPT type = "text/JavaScript"> function tishi () {If (confirm ('Are you sure you want to delete it? ') {Document. getelementbyidx_x ('hidevalue '). value = '1'; // window. location. href = Window. location. href;} else {document. getelementbyidx_x ('hidevalue '). value = '0'; }}</SCRIPT>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.