Web Hosting Offers
See the new scripts recently added to Dynamic Drive. Click here.
Original, practical CSS codes and examples such as CSS menus for your site.
    Search code samples  
 
  Keyword
 
 
 
   
 
 
  Code Samples
 
ASP
CSS
Dhtml
Html
Javascript
PHP
 
   
     LOGIN HERE  
 
Username
Password
Forgot Password
Verify Signup
 
 
 

ASP >> General

How can i get the current page URL

Visitor Ratings (0) :

Description
Suppose the current page is simply "http://www.mysite,com/view_user.asp"

This is all you need to get you the current page URL
<%
Thispage = Request.ServerVariables("script_name")
%>

Now, if your page has Querystring info and variables you want as well.
Like so "http://www.mysite,com/view_user.asp?ID=1&Name=Fred"

you would use code like this.

<%
Thispage = Request.ServerVariables("script_name") & "?" & Request.Querystring
%>
Code
Select All
 Rate this Resource