Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > grab ID# from address bar

Reply
Thread Tools

grab ID# from address bar

 
 
Joey
Guest
Posts: n/a
 
      05-25-2007
I bet this is a simple one, but I just don't know.

www.mydomainname.com/12345

How do I grab the 12345 in my ASP page as the ID#?





*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Joey
Guest
Posts: n/a
 
      05-25-2007


Ok, I pressed SUBMIT too quickly.

So, I need to know how to grab 12345 if someone goes to
www.mydomainname.com/12345. I also need to know what ASP page to create
since there is no .asp at the end of the address bar. Is this is custom
404 page?


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      05-25-2007
Joey wrote on 25 mei 2007 in microsoft.public.inetserver.asp.general:

> Ok, I pressed SUBMIT too quickly.
>
> So, I need to know how to grab 12345 if someone goes to
> www.mydomainname.com/12345. I also need to know what ASP page to create
> since there is no .asp at the end of the address bar. Is this is custom
> 404 page?
>


Yes, you can use 404.asp if set in IIS,
and if /12345 does not exist as a directory:

<%

qstr = Request.ServerVariables("HTTP_REFERER")

if instr(qstr,":80/12345/")>0 then
server.transfer "/mySecretDirectory/12345page.asp"
end if

%><html>

<head>
<title>404 - </title>
</head>

<body>
<h1>this is the 404 page</h1>
..............

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox search bar and address bar? djin Firefox 3 10-02-2005 02:44 PM
disable title bar, status bar, and address bar of a window Matt HTML 9 08-23-2004 07:49 PM
javascript to disable the title bar, status bar, and address bar of a window Matt Javascript 9 08-23-2004 01:23 PM
Re: disable title bar, status bar, and address bar of a browser window John Hann ASP .Net 0 08-21-2004 05:07 AM
disable title bar, status bar, and address bar of a browser window Matt ASP .Net 0 08-21-2004 03:50 AM



Advertisments