Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking HTML pages with ASP 1

Status
Not open for further replies.

Chipsman

Programmer
May 26, 2005
44
GB
Hello everybody,

I am new on this great site, and I'm hoping to find some help here.

I am designing a big website and for the first time I am using ASP pages. My problem is that it doesn't work when I make a link from a HTML page to an ASP page.

What I don't understand is that it's just a simple link from one page to an other... Can you help me? I'm sure that it shouldn't be more complicated than that...

In Brief:
I create a new folder, using Dreamweaver MX I create an HTML page called "Index.htm", then an ASP page called "Lasttesting.asp". Then I make a link from the first page to the second. I test it, the "Index.htm" opens fine, I click on the link and I get this:

============================================
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

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

A name was started with an invalid character. Error processing resource 'file:///C:/Inetpub/
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
-^
 

It sounds to me like the page isn't being parsed through IIS (and so doesn't process the ASP server-side directives). You need to set up IIS on your development machine -- or upload the pages to a working ASP host.

You can view html pages just by opening them in a browser... but PHP, JSP, CFM and ASP all require to be processed (via a web server) before they are delivered to your browser.

Cheers,
Jeff

 
Thanks Jeff for your answer.

The thing is that if I test the ASP page alone, it works fine. Therefore I think that I set up the IIS correctly.

What I mean is that HTML pages display fine, ASP pages display fine as well. It's when I link one to the other that it doesn't work.

Thanks
 

Make sure that when you request the ASP file from the HTML file... that the link (on the HTML file) does not have a full path like this:
Code:
<a href="C:\path\to\file\mypage.asp">Test</a>
But instead contains a relative (or absolute) path to the file. If the two files (HTML and ASP) are in the same directory then you might use:
Code:
<a href="mypage.asp">Test</a>

Cheers,
Jeff
 
To add to what BabyJeffy said... to preview an asp page it must be served through IIS. So you will not be able to preview it by going to it directly, you will have to set up a virtual web on your PC and goto
Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Thank you guys for your help :)

Jeff, I checked, the path is correct.

Pizl8r, When I test my pages with Dreamweaver MX the link never worked, but when I typed that it worked!! I can't beleive it! It's been 3 months that I was trying to understand how to make it work. I always tested it from Dreamweaver...

Dreamweaver seems to s*ck a bit no?

Thanks
 
no. DW is one of, if not the absolute, best develpment app you'll ever pay for. the sucky part is asp. :)

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Actually I disagree that ASP is sucky. Dreamweaver can be set (depending on version) to preview ASP pages correctly. I think you just have to set up the default server.

Personally I think DW is a good tool.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top