HighDots Forums  

Code to display text on ASP page?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Code to display text on ASP page? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Macromedia
 
Posts: n/a

Default Code to display text on ASP page? - 11-06-2004 , 07:38 AM






Hi, Hope this makes sense..

I need to add a short note at the top of a certain ASP products list.

What ASP code would I need to add to check to see whether product with an id
number is in the HTTP request?

So, in PHP something like this at the top of the product or page..

<?php
if ($_GET["prod"] == 1)
{print "text for product 1";
}
elseif
($_GET["prod"] == 2) {print "text for product 2";
} else {print "default text";
}
?>

For example 'If yes' it displays the text for product 1, if no it checks for
product 2 etc.
If neither product id is in the HTTP request it displays the default text
(which might be blank I guess). Not sure..




Reply With Quote
  #2  
Old   
Ken Ford - PVII Support
 
Posts: n/a

Default Re: Code to display text on ASP page? - 11-06-2004 , 09:27 AM






<%
If Request.QueryString("ID") = 1 Then
Response.Write("It is a 1")
ElseIf Request.QueryString("ID") = 2 Then
Response.Write("It is a 2")
End If
%>

--
Ken Ford
Certified Dreamweaver MX 2004 Developer
PVII Support Team
http://www.projectseven.com
Team Macromedia Volunteer - Dreamweaver


"Macromedia" <woodywyatt (AT) fuerteventura (DOT) com> wrote

Quote:
Hi, Hope this makes sense..

I need to add a short note at the top of a certain ASP products list.

What ASP code would I need to add to check to see whether product with an id
number is in the HTTP request?

So, in PHP something like this at the top of the product or page..

?php
if ($_GET["prod"] == 1)
{print "text for product 1";
}
elseif
($_GET["prod"] == 2) {print "text for product 2";
} else {print "default text";
}
?

For example 'If yes' it displays the text for product 1, if no it checks for
product 2 etc.
If neither product id is in the HTTP request it displays the default text
(which might be blank I guess). Not sure..






Reply With Quote
Reply




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.