When I try to browse page with the content listed down , IE shows message:
Welcome.In WebServerLand the time is currently, but it doesn't show time.
I have IIS 5.1 and Visual Studio.NET. I' new in this so any help is
welcome. tnx;)


<script language="c#" runat="server">
void Page_Load()
{
time.Text = DateTime.Now.Hour.ToString() + ":" +
DateTime.Now.Minute.ToString() + ":" +
DateTime.Now.Second.ToString();
}
</script>

<html>
<head><title>The Punctual Web Server</title></head>
<body>
<h1>Welcome</h1>
In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
<body/>
<html/>

Re: help by Kristofer

Kristofer
Wed Feb 23 13:27:19 CST 2005

Hi,

The code is working fine for me, although you probably want to close
<body> and <html> by using </body> and </html> instead.

Did you save the file with an ASPX extension, for example time.aspx? If
you have done that, and are browsing the file using
http://localhost/time.aspx, please try to run this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306005

to repair the mappings. After you have done this, it should work fine.

Good Luck!

--
Regards,
Kristofer Gafvert
www.gafvert.info - My Articles and help
www.ilopia.com


Val wrote:

> When I try to browse page with the content listed down , IE shows
message:
> Welcome.In WebServerLand the time is currently, but it doesn't show time.
> I have IIS 5.1 and Visual Studio.NET. I' new in this so any help is
> welcome. tnx;)
>
>
> <script language="c#" runat="server">
> void Page_Load()
> {
> time.Text = DateTime.Now.Hour.ToString() + ":" +
> DateTime.Now.Minute.ToString() + ":" +
> DateTime.Now.Second.ToString();
> }
> </script>
>
> <html>
> <head><title>The Punctual Web Server</title></head>
> <body>
> <h1>Welcome</h1>
> In WebServerLand the time is currently:
> <asp:label id="time" runat="server" />
> <body/>
> <html/>