Print Page | Close Window

If you are in this page then....

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1685
Printed Date: 28 March 2026 at 11:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: If you are in this page then....
Posted By: Pegaso
Subject: If you are in this page then....
Date Posted: 08 April 2003 at 8:18am

It's possible to make a Navigation Bar (include file) that will change depending of the page?

An Example:

If the navigation bar is opened in the site index1.asp then show image1

or

if the navigation bar is opened in the site index2.asp then show image2

I hope you understand my English.



-------------



Replies:
Posted By: MorningZ
Date Posted: 08 April 2003 at 2:46pm
if Request.ServerVariables("SCRIPT_NAME") = "/thispath/index1.asp" then
   show image one
elseif Request.ServerVariables("SCRIPT_NAME") = "/thispath/index2.asp" then
   show image one
end if

etc etc

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Pegaso
Date Posted: 08 April 2003 at 4:49pm

Thaks, tomorrow i will try.

Good night to all.



-------------


Posted By: Pegaso
Date Posted: 09 April 2003 at 5:56am

OK your script works fine.

Now i'm testing a new solution:

include.asp

<%
if PageArt = 1 then
   Response.write "image1"
Else
   Response.write "image2"
End If
%>

And in each page i will add the definition and the value of Pageart.

Why i need this script?? I'm trying to utilize my forum navigation bar for the entire site, but in the forum i need some buttons, in the rest of the site i need some others buttons.

Someone have another good idea??



-------------


Posted By: MorningZ
Date Posted: 09 April 2003 at 6:20am
so you look at the script name variable, and decide to trun on or off certain buttons

i am not sure where you see complexity in that, its a simple "if.... end if"

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Pegaso
Date Posted: 09 April 2003 at 6:41am

Now it work fine .

Now i must only define how many conditions i need in the entire site and decide if i will use a "if....end if" code or a Select Case code.

No it's not complex..... but i'm a new ASP "user" and i work with a good book and many many tests .

I have ever worked with Dreamweaver Ultradev and never looked the ASP code, now i have a new server and the Dreamweaver sites didn't work on it.....so i must remake each page.

It's a long work, but ASP is a great thing and it's really nice work with this language.



-------------


Posted By: MorningZ
Date Posted: 09 April 2003 at 6:46am
not sure how far into "Classic ASP" you are.. but if its still really early, you may want to switch gears and learn ASP.NET instead

it's capable of so much more than last version of ASP

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Pegaso
Date Posted: 09 April 2003 at 6:56am

What are the difference?

An ASP server support ASP.NET?



-------------


Posted By: Bluefrog
Date Posted: 09 April 2003 at 8:19am
Originally posted by Pegaso Pegaso wrote:

What are the difference?

An ASP server support ASP.NET?

No. ASP runs off of the default IIS installation on several Windows OSes. (e.g. 2000 Server) ASP.NET needs the .NET framework installed in order to run. You can get the .NET framework from the Microsoft site.

MorningZ is right about getting into .NET.  Think of it like this... HTML pages are like butter knives... ASP is like a chainsaw... and .NET is like a light saber...

May the Force be with you

 

 



Posted By: Pegaso
Date Posted: 09 April 2003 at 8:54am

OK.

Another question: The Classic ASP pages works on an ASP.Net Server?

 



-------------


Posted By: Bluefrog
Date Posted: 09 April 2003 at 10:37am
Originally posted by Pegaso Pegaso wrote:

Another question: The Classic ASP pages works on an ASP.Net Server?

Yes... BUT... file.aspx does not. You must have your file names correct. ASP files are passed to a different processor than ASP.NET files. (index.asp vs. index.aspx)

Hope that helps.

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net