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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML and ASP love story 1

Status
Not open for further replies.

Chipsman

Programmer
Joined
May 26, 2005
Messages
44
Location
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"%>
-^


Why have I accepted that job??
 
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
 
Sure.

Index.htm

==============================================
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>

<a href="TestingPage.asp">testingpage</a>

</body>
</html>
===================================================

You see? it's just a HTML page with a link to an ASP one.

Someone suggested that I change the path in IE like this:

Instead of C:/Inetpub/typing:
In that case when I click on the link it opens the ASP page and it works! Strange right?

To summarize, I can't test my site with Dreamweaver, but I can test it if I type the path myself in IE.

Why have I accepted that job??
 
Looks like DW setup for the site may be wrong. Check in your site setup for Testing Server to see it's set correctly to your local server

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
can i see the ASP code? if you declare the document with a <?xml> tag then the tags must be strictly closed etc...

Known is handfull, Unknown is worldfull
 
Sure Vbkris

Here is the ASP code. I am using a database in it, with server behavior and all:


=====================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/myContacts.asp" -->
<%
var rsContacts = Server.CreateObject("ADODB.Recordset");
rsContacts.ActiveConnection = MM_myContacts_STRING;
rsContacts.Source = "SELECT * FROM Contacts";
rsContacts.CursorType = 0;
rsContacts.CursorLocation = 2;
rsContacts.LockType = 1;
rsContacts.Open();
var rsContacts_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
rsContacts_numRows += Repeat1__numRows;
%>
<html xmlns="<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
<% while ((Repeat1__numRows-- != 0) && (!rsContacts.EOF)) { %>
<p>Testing... <%=(rsContacts.Fields.Item("FirstName").Value)%> </p>
<p>&nbsp;</p>
<p><%=(rsContacts.Fields.Item("MiddleName").Value)%> <%=(rsContacts.Fields.Item("LastName").Value)%><%=(rsContacts.Fields.Item("Suffix").Value)%><%=(rsContacts.Fields.Item("Company").Value)%><%=(rsContacts.Fields.Item("Department").Value)%></p>
<%
Repeat1__index++;
rsContacts.MoveNext();
}
%>
</body>
</html>
<%
rsContacts.Close();
%>
================================================

Does this help?
Thanks
 
how are you calling the ASP file? ie what appears in the address bar when the asp page is called???

Known is handfull, Unknown is worldfull
 
then the page is not run as an asp page at all!!! ASP pages must be run from a server like IIS or PWS, the bar will look like this:

Known is handfull, Unknown is worldfull
 
Yea it works now, this is weird, why doesn't it work when I test it with DW then?

Thanks vbkris ;-)
 
because you have the test server details set up wrong. As vbkris has said make sure your remote and test server point at whatever your site is called)

Cheech

[Peace][Pipe]
 
Also, you have the default server language set incorrectly in the line "<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>" it is set to JAVASCRIPT. It should be set to VbScript or VB.net or C#.


************
My purpose in life is to show others what not to do.
<!--Caution, dates on calendar are closer then they appear.-->
 
Thanks guys.

TRC thanks but no that doesn't appear to be the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top