Browser doesn't show controls. (New in .NET)

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

My browser doesn't show text boxes, labels etc.
It seems that it doesn't read the script at all (C#).

I use the following program (from a wrox book):

<----------------------------------------
<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>
-------------------------------------------------------------------->

And the browser displays only...

<----------------------------------
Welcome
In WebServerLand the time is currently:
-------------------------------------------------------------------->

.... and it doesn't show the time!

I have set a virtual dir. in my local computer and IIS is running.

Any idea?

Thanks, Jim.
 
Back
Top