How to solve the history. back () Refresh problem in Asp Programming

Source: Internet
Author: User

In asp Web page programming, it is always history. after back (), the original page cannot be automatically refreshed. For example, if you delete a record in a form, after submitting the page, write the following statement: Response. write "<Script> alert (Deleted successfully !); History. back () </Script>"

Then the returned result shows that the original record is still displayed on the asp page, but the database has been deleted. That is to say, the page can be automatically refreshed after I need to return the result to synchronize with the database.
You only need to add the js Code behind it to solve the location. reload () problem.

The Code is as follows:
Response. Write "<Script> alert (Deleted successfully !); History. back (); location. reload (); </Script>"

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.