The influence of the window. Open Method on the history object on the ASP. NET page and Its Solution

Source: Internet
Author: User
On the ASP. NET page, if you want to return to the previous page. You can call the window. History. Back () method of JavaScript. In most cases
Is valid, but if there is a button in the interface and other controls execute the window. open () JavaScript method to open other pages,
The window. History. Back () method is not easy to use because JavaScript saves the opened page address to the history object. Therefore, if
In the dry window. open () method, the window. History. Back () method of the corresponding number of times must be executed before execution.
The window. History. Back () method returns the previous page.
Knowing the cause of the problem solves the problem. We only need to call the window every time. run window once after the open () method. history. back () to clear the page address of the histroy object. The problem is solved smoothly !!

InstanceCodeIt is implemented in vs2005, and is also applicable in vs2003. Vs2008 not tested!

Instance Source: http://files.cnblogs.com/redleaf1995/testHistory.rar

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.