To display the web page again, Internet Explorer needs to resend the previously submitted information

Source: Internet
Author: User
Request. Form ()/request. querystring ()/Request ()

Request. Form () ------------ get the value of the Form submission Element

Request. querystring () --- get the element value submitted by the URL

Request () ------------------ the above two sets

 

In Asp.net, when a user refreshes the current page, the system prompts "whether to submit again ~"

To avoid this prompt, you can handle the following:

When you use document. Location. Reload (); or press F5, the following occurs:
To display the web page again, Internet Explorer needs to resend the previously submitted information.
If you are trading, click "cancel" to avoid repeated transactions.
Otherwise, click "retry" to display the webpage again.
JS Solution

<SCRIPT type = "text/JavaScript">
Function jsmessagedelete (ID)
{
Filters. WCF. wcfclient. _ default. deletemessage (ID). value;
Location. href = location. href; // use this to replace document. Location. Reload ();
}
</SCRIPT>

CS Solution
You can add a reload page at the end of the executed method.
Response. Redirect (request. url. tostring ());

Related Article

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.