ALL >> Computers >> View Article
How To Find The Current Url With Asp
The full URL to a page comes in three parts: The domain name, the path to the file then the filename, and the QueryString. For example, take the URL http://www.example.com/example/page.asp?name=Bob. The three parts of this are:
The domain name: www.example.com
The path to the page: /example/page.asp
The QueryString: name=Bob
So how do you find it all out with your own scripts? Well the following code should do it:
<%@language="VBScript"%>
<%
Dim strDomain, strPath, strQueryString, strURL
' find out the domain:
strDomain = Request.ServerVariables("HTTP_HOST")
' find out the path to the current file:
strPath = Request.ServerVariables("URL")
' find out the QueryString:
strQueryString = Request.ServerVariables("QUERY_STRING")
' put it all together:
strURL = "http://" & strDomain & strPath & "?" & strQueryString
Response.Write "The current URL is: " & strURL
%>
Add Comment
Computers Articles
1. Spark Matrix™: Multi-carrier Parcel Management SolutionsAuthor: Umangp
2. Best Odoo Erp Software Company In Dubai For Business Growth
Author: Mayur Meheshwari
3. Top Challenges Faced By Equipment Rental Companies In The Uae — And How Erp Solves Them
Author: Al murooj solutions
4. Spark Matrix™: Intelligent Virtual Assistants (iva)
Author: Umangp
5. Pos Software Designed For Retail Operations
Author: EPOS Direct
6. Erp System That Reduces Stress And Improves Productivity
Author: Shalijah
7. Spark Matrix™: Global Service Parts Planning Application
Author: Umangp
8. Spark Matrix™: Enterprise Information Archiving
Author: Umangp
9. Textideo: Transforming Text Into Engaging Ai-powered Videos For Modern Creators
Author: Ethan Walker
10. Spark Matrix™: Enterprise Ai Search
Author: Umangp
11. What Identity Governance Really Means In Modern Enterprises
Author: Mansoor Alam
12. Strategies For Successful Site Selection In Clinical Trials
Author: Giselle Bates
13. Simplifying Business Purchases With Smart, Reliable Procurement Solutions
Author: suma
14. How Businesses In Dubai Are Scaling Faster With Modern Erp Software
Author: Al murooj solutions
15. How To Choose The Right Weapon Tracking System: 7 Must-have Features
Author: 3PL Insights






