123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computers >> View Article

How To Find The Current Url With Asp

Profile Picture
By Author: Sven Vdhrison
Total Articles: 3
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

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
%>

Total Views: 68Word Count: 141See All articles From Author

Add Comment

Computers Articles

1. Managed Soc Services For It Companies
Author: Devendra singh

2. Ai Data Protection Compliance: Best Practices For Secure Business Operations
Author: Devendra singh

3. Privileged Access Management (pam): Strengthening Enterprise Security And Access Control
Author: Umangp

4. Qlikview Tutorial For Data Analytics: Create Interactive Dashboards And Reports
Author: Tech Point

5. Enterprise Email Security: Strengthening Protection Against Evolving Email Threats
Author: Umangp

6. Access Management Market Trends: Future Growth And Emerging Technologies
Author: Umangp

7. Mobile App Scraping
Author: MObile app scraping

8. Master Data Management Solutions: Driving Data Quality Through Ai And Cloud
Author: Umangp

9. Digital Marketing Analytics Platforms: Key Trends, Benefits, And Future Market Outlook
Author: Umangp

10. Ai Governance Market: Trends Driving Responsible Ai Adoption
Author: Umangp

11. Spark Matrix™: Access Management
Author: Umangp

12. The Future Of Digital Content In India: Why Photo Sharing And Cloud Storage Are Converging
Author: vijaylaxmi soni

13. Looking For German Industrial Chemicals Suppliers? Choose The Right Partner With Roteschemie
Author: Roteschemie

14. Ai Augmented Software Development: Ai-driven Coding, Automated Testing, Risk Prediction, Team Collaboration, Productivity, And Market Outlook
Author: Umangp

15. Kiosk Systems In Hyderabad For Modern Businesses
Author: pbs

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: