Current location: Hot Scripts Forums » Programming Languages » ASP » If this URL - ASP


If this URL - ASP

Reply
  #1 (permalink)  
Old 11-13-08, 05:31 AM
amoss amoss is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
If this URL - ASP

I wonder if anyone can help me with some I ASP code I've been unable to find.

I basically need it to say:

If this you're on this url, this url, this url

then display the image

else don't display the image

I had some php do a similar thing which looked like this:

PHP Code:

 <?php


if ($_SERVER['REQUEST_URI'] == '/')
{
   include 
'footerpoints.php';
}
else
{
}

?>
If anyone can help I'd be very grateful. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-13-08, 12:02 PM
Yeroon's Avatar
Yeroon Yeroon is offline
Code Master
 
Join Date: Aug 2007
Location: Netherlands, Nijmegen
Posts: 850
Thanks: 2
Thanked 20 Times in 20 Posts
try this:

Code:
<%
  Dim filename
  filename = Request.ServerVariables("SCRIPT_NAME") 
  If filename = "mypage.asp" Then
    //do this
  Else If filename = "otherpage.asp" Then
   //do that
  End If
%>
You could also use a Select Case construct
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP or PHP which is better? nepala The Lounge 9 07-14-10 06:48 AM
Lil php coding help for url shortning script pede69 PHP 2 04-03-08 06:04 AM
Need help: Html script- url linking nyjumpman23 HTML/XHTML/XML 5 09-28-05 10:19 PM
The Reasons Why do you Need URL Rewriting MODULE to Enchance your Web? handry PHP 11 08-05-05 08:32 AM
ASP and JMAIL bdannels ASP 1 01-04-05 08:36 AM


All times are GMT -5. The time now is 08:03 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.