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!

Unable to display ASP file

Status
Not open for further replies.

wsexton

Technical User
Joined
Dec 4, 2001
Messages
49
Location
US
I have this file:

<html>
<body>
<%
response.write(&quot;Hello World!&quot;)
%>
</body>
</html>

I run this from this file:

<!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 3.0//EN&quot; &quot;html.dtd&quot;>
<HTML>
<BODY>
<P><a href=&quot;atest.asp&quot; target=&quot;main&quot; class=NavLink>Test</a></P>
</BODY>
</HTML>

I get a black window when I run this. This is on an NT server with IIS. Any help is appreciated.
 
the .asp page must be saved in the Personal Web Sever in order for it to run



here, copy/past this code and save it on your PWS calling it mytest.asp
***************************
<%
Dim I ' declare our loop index variable
%>

<%
' Start the loop telling it to loop from 1 to 5 incrementing
' I by one (which is the default) on each pass.
'
' ie. this would have done the same thing:
' For I = 1 To 5

For I = 1 To 5 Step 1
' Output our HTML and text using the value of I as
' the FONT TAG's SIZE attribute.
%>
<FONT SIZE=&quot;<%= I %>&quot;>Hello World</FONT><BR>
<%
Next ' Bounce back to the top of the loop
%>
***************************

Then open your browser and type
see if it works

The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee....
 
It works! Thanks! Now I'd like to know why. The file is on an NT server with IIS on my network. Your example worked, yet mine didn't. Why???
 
I just ran your sample on my PWS ad it works. Obviously the link to the atest.asp page does not because I don't know what you're intended results are on that page...



The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee....
 
This is my first attempt to use ASP, so I hope you'll excuse the dumb questions. The file is saved on a network computer that is using NT Server and IIS. I've mapped a drive from my computer to it, then I run the HTML file that calls atest.asp. That's when I get the blank screen instead of it displaying Hello World. However, when I run your example it works. I'm not sure why.
 
get rid fo teh target or make it a valid page or setting for that attrib
eg: target=&quot;main&quot;

more info

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
also me saying valid page is missleading now that I read it. target does not receive a URL ofr page name. the href value is that direction

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
Okay, I believe I understand what you're saying. However, here's another problem I'm having. Here's an asp file I'm like to from my HTML file:

<%
Dim Conn, dbPath, strQuery, objRS
dbPath = &quot;c:\inetput\ Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open &quot;PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=&quot; & dbPath
strQuery = &quot;SELECT name from workstat;&quot;
objRS = Conn.Execute(strQuery)
While Not objRS.EOF
Response.Write objRS(&quot;name&quot;)
objRS.MoveNext
Wend
%>

This gives me a blank page instead of writing name from the query. I have the correct path to oldTrackit.mdb. It resides on the NT server that I've mapped a drive to and where the asp and html files are. Help!
 
are you sure it is returning records?
try outputting something prior to the loop
eg:
Response.Write &quot;Test<br>&quot;
While Not objRS.EOF
Response.Write objRS(&quot;name&quot;)
objRS.MoveNext
Wend

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
also the way you structure your SQL you should do a
Response.Write objRS(0)


_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
along with a WHERE clause.

damn submit button is getting me today [lol]

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
Response.Write &quot;Test<br>&quot; doesn't display. I just get a blank screen.
 
Also:

For I = 1 To 5 Step 1
' Output our HTML and text using the value of I as
' the FONT TAG's SIZE attribute.
%>
<FONT SIZE=&quot;<%= I %>&quot;>Hello World</FONT><BR>
<%
Next ' Bounce back to the top of the loop

Hello World displays but the font size doesn't increment. It's almost as if ASP isn't working on this server. It's NT and has IIS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top