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!

cannot display asp

Status
Not open for further replies.

88weird

Technical User
Feb 2, 2003
4
US
I am using windows xp and have iis 5.0 installed. I am new to asp and am trying to get my code to display in the browser. when i open it in internet explorer, I just get a blank page, or the html and it will not execute the asp scripts. I have tried several different asp files.
this is not my code i am just trying to get some examples to work

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>


<HTML>
<HEAD>
<TITLE>Demo ASP page</TITLE>
</HEAD>
<BODY>


<h1>just some standard html</h1>
<%
response.write(&quot;using asp to write to the page&quot;)


'PROGRAMMERS NOTE
'the line terminator in VBs is the carriage return!



'lets tell everyone what day of the week it is!


'get the current date
currentDate = Date


'extract the day of the week information
weekDayValue = weekday(currentDate)


'work out what the value is in real money
'PROGRAMMERS NOTE
'you could do this with a CASE statement
'so if you feel brave look up the SELECT CASE
'and use that instead of the big if


if weekDayValue = 1 then
weekDayActual = &quot;Sunday&quot;
elseif weekDayValue = 2 then
weekDayActual = &quot;Monday&quot;
elseif weekDayValue = 3 then
weekDayActual = &quot;Tuesday&quot;
elseif weekDayValue = 4 then
weekDayActual = &quot;Wednesday&quot;
elseif weekDayValue = 5 then
weekDayActual = &quot;Thursday&quot;
elseif weekDayValue = 6 then
weekDayActual = &quot;Friday&quot;
elseif weekDayValue = 7 then
weekDayActual = &quot;Saturday&quot;
else
weekDayActual = &quot;Ooops, something's not right here!&quot;
end if
%>


<p>
Today is <b><i><%= weekdayActual %></i></b>


</BODY>
</HTML>
 
do nto try such a complex program at fisrt. try a program with just a response.write statement.

<html>
<body>
<%=&quot;Is this printed&quot;%>
</body>
</html>
 
What error is being displayed if any? If no error is visible and just a blank page then do a 'View Source' as the error may be displayed there Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Hi,

I also facing the same problem you had for couple of days. Me as well new to this technology.

I would really appreciate if you could share the ideas or logic you got to solve your problem.

Many thanks in advance...

Regards,

Ahmed J.
email: ajewahar@sa.dhl.com
 
Check in Internet Information Services that scripts are allowed to run, this is the case by default i believe, but may be worth checking as the code above works fine. Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Yes, scripts are allowed to run....

Appreciate you help....

Rgds - Ahmed

 
No error message... In the status bar I coiuld see the message like &quot;connecting to <machine>..&quot;

Below is the code I tried: Alll HTML part printed. No ASP part displayed.

Once I get both displayed.

<html>
<head><title>This is the First ASP test</title>
</head>

<body>

This is the first line of the page <br>

This is the 2nd line of the page <br>
This is the 3rd line of the page <br>

<%
x = 10*30
Response.Write &quot;The Product of 10 and 30 is :&quot; & x
Response.Write &quot;The Product of 10 and 30 is :&quot; & x
%>



</body>
</html>
 
I do not get any error messages and scripts are running. All I get on this particular script is (Just some standard html todays date is) and then nothing else. it does not display the date
 
yes it is in my directory. Right now I am just going to that directory, right clicking and opening with internet explorer.
 
No error message. I access the ASP from my workstation. Type the following in address bar:

or IP/test/First.ASP

Shall I reinstall IIS again on Win2002 Server ?.

Rgds - Ahmed
 
Do a view source from your browser and see if the asp script is showing up in the source, if it isn't then there is at least som processing happening, if the asp is in the source exactctly like it is in your file than nothing is processing.

-Tarwn ________________________________________________________________________________
Sometimes it is how you ask the question: faq333-2924
Many ASP questions have already been answered, please check faq333-3048 and use the search tool before posting
 
Yes, tried the following code in a file called &quot;test_new.asp&quot;

<html>
<body>
<h3> Helloooo </h3>
<hr><hr>
<%=&quot;Is this printed&quot;%>
</body>
</html>

I type the following from IE address bar to load the above ASP file:


Nothing displayed on Browser. I get a message after longtime. timeout expired.

I tried to load the above ASP file from IE file/open method where I get HTML part is being displayed. I look for the source and found all my above codes in place.

It's really strange !!!! .Any luck to solve this problem

Secondly, the &quot;back slash (//) I used with http:// is it correct ?.

Rgds - Ahmed
 
I tried the following code in a .HTML file. Teh address I type as follows from IE and it works fine. But ASP part not displayed.

Address:
<html>
<body>
<h3> Helooow </h3>
<hr><hr><hr>
<hr color =&quot;green&quot; size = 6>
<%=&quot;Is this printed&quot;%>
</body>
</html>

Is there any luck to get this problem ?. Thanks for your reply..

Looking frwd to rcve your advise...

Rgds - Ahmed
 
hi,
never include ASP in .html, it never works.
excluding the ASP check wether a plain html works.
 
Excluded ASP part from .HTML file.

Tried to load .HTML file. It works fine. Also I tried other HTML files available in the IIS server and all of them work fine.

Rgds - Ahmed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top