Automatically return to the last request page (TIPS)

Source: Internet
Author: User
When you enter the management page and the session and cookie disappear, you must return to the logon page. After logging on, we still want to return to the Management page. this is very important. you can use an attribute of the request to implement the request. urlreferrer

Obtain information about the URL of the client's last request. The request is linked to the current URL.

When a page jumps to this page, it will record the URL that jumps to this page, and then use this URL to return. Tips to record it

1 protected void page_load (Object sender, eventargs E)
2 {
3 viewstate ["urlreferrer"] = request. urlreferrer. tostring ();
4
5 hyperlink1.navigateurl = (string) viewstate ["urlreferrer"];
6 response. Write (string) viewstate ["urlreferrer"]);
7}

 

 

Http://clingingboy.cnblogs.com/archive/2006/03/26/359290.html

 

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.