General discussion

Locked

Showing Simple ASP Code

By BorgInva ·
I am (currently) running IIS v5.1 on XP Pro SP2. I am trying to start using ASP codes.

I mdke a page and saved it as date.asp with only this code:

<% =date %>

But when I view it, either IE of FF, I see the code and not the actual date.

What do I need to do to display code that I want to add to my site? Am I missing something in IIS?

Thanks.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by BorgInva In reply to Showing Simple ASP Code

I made the page in a blank Frontpage 2003 page, and even tried Notepad. Same results. I can view other website's ASP pages and code, but not when I create it.
Thank you for any help.

Collapse -

by dawgit In reply to Showing Simple ASP Code

Just a guess here, (ok, a stab in the dark) Did I miss something? Did you establish a valid site/page first where you want the date to show? With just that code alone seems like there's something missing. But you'll get better ideas from someone else I'm sure (I hope)

Collapse -

by lowlands In reply to Showing Simple ASP Code

create date.asp in notepad and paste this:

<html>
<head></head>
<body>

<p><% =date %> </p>

</body>

that should do the trick

Collapse -

by lowlands In reply to

that didn't paste properly:

<html>
<head></head>
<body>
<p><% =date %> </p>
</body>
</html>

Collapse -

by lowlands In reply to

In that case, make sure you have ASP(.NET) installed on your XP workstation.

Run the following (path will depend on what .net version you have installed)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe

Collapse -

by lowlands In reply to

In that case, make sure you have ASP(.NET) installed on your XP workstation.

Run the following (path will depend on what .net version you have installed)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe

Collapse -

by BorgInva In reply to Showing Simple ASP Code

lowlands, I tried the code you provided and when I open the page in IE or FF, it still shows only the entered ASP code.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

That is my directory.

There must be something with my PC settings. Maybe IIS. I do not know. I only started looking into ASP this week! I am that new of a newbie!

I have also found out that any *.asp file on my PC will only display code. Even the IIS help file. If I view a website that ends in .asp, it views fine. I save that website (tried a couple) and I can view it again fine. So for some reason I can not view asp files from my PC. I even tried another XP Pro PC. Same results.

So what are they missing that needs to be done to show even this simplist ASP code?

Collapse -

by amrita_pritam1 In reply to Showing Simple ASP Code

this code is not <% =date %> but <%= date() %>

Back to Windows Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums