Request. servervariables ("script_name") is obtained on the server
Document. Location. href is obtained from the client
-----------------------------------------------------------------------------
You can construct the URL of the current page as follows:
"Http: //" & request. servervariables ("http_host") & request. servervariables ("path_info ")&"? "& Request. servervariables (" QUERY_STRING ")
After obtaining this string, we are writing "Master/detail table"ProgramAfter multiple operations on the detail Table Page, you can still return to the master table. The query parameters and page numbers are retained. Of course, if the detail list operation is performed in the new window, you don't need to peat it here.
How to implement it? For example, we have a student list, which can be queried by class, age, and other conditions, and are directed to the intermediate page number. We can add:
Response. cookies ("mysite") ("url") = "http: //" & request. servervariables ("http_host") & request. servervariables ("path_info ")&"? "& Request. servervariables (" QUERY_STRING ")
Write the URL of the current page into cookies. After clicking the name to the detail table and editing, updating, or deleting the page, run the following statement:
Response. Redirect (request. Cookies ("mysite") ("url "))