Internet Products
1752589 Members
4227 Online
108788 Solutions
New Discussion юеВ

ASP code in web page won't execute

 
Tony Romero
Advisor

ASP code in web page won't execute

I upgraded from NT 4.0 to 2000 Server and now the ASP code within the web pages won't execute.

A simple
<% Time %> won't show anything. Any clues ASP gurus?

Thanks,

Tony
Freedom!!!
5 REPLIES 5
Jon Finley
Honored Contributor

Re: ASP code in web page won't execute

Must has changed..... try:

<%=(time)%>


Full reference:

Time = <%=(time)%>. (results in: 2:04:16 PM)
Date = <%=(date)%>.(results in: 2/3/2003)
"Now" = <%=(now)%>. (results in: 2/3/2003 2:04:16 PM)

Note: These will all display the time or date on the server, not the time on the user's computer.

To get the date to display like this, Today is: February 3, 2003, use the following:
<%
datToday = Date()
intThisYear = Year(datToday)
intThisMonth = Month(datToday)
intThisDay = Day(datToday)
strMonthName = MonthName(intThisMonth)
%>
Today is: <% = strMonthName %> <% = intThisDay %>, <% = intThisYear %>

To display Day of Week plus Date, like this, Monday, February 03, 2003, use the following :

<%= FormatDateTime(date,1) %>


Jon
"Do or do not. There is no try!" - Yoda
Tony Romero
Advisor

Re: ASP code in web page won't execute

Jon, thanks for your input. However that doesn't explain why the rest of the unchanged ASP code, which is my main problem won't execute.

Tony
Freedom!!!
Jon Finley
Honored Contributor

Re: ASP code in web page won't execute

Ok.... tested it on my server, and <% =time %> works fine.

Are there any errors messages in the client's browser?

Do the functions display anything?

I would think that this could be permissions related, (read but not execute), or clients are blocking scripts locally.

Still doing some checking for you.

Jon
"Do or do not. There is no try!" - Yoda
Jon Finley
Honored Contributor

Re: ASP code in web page won't execute

One thing related to upgrading:
http://support.microsoft.com/default.aspx?scid=kb;en-us;304916

Jon
"Do or do not. There is no try!" - Yoda
Kurt Matthies
Valued Contributor

Re: ASP code in web page won't execute

Never seen this problem, but.

let's check out the webserver.

Is it running?

What are the mappings for the .ASP files? (look in properties/Home Directory/Configuration/App Mappings

Is there a mapping for .ASP files?

If so, perhaps you need to register asp.dll? (regsrv32)

Did any of this make sense?
If if ain't broke, don't fix it.