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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic 'setup' help needed... can't run the simplest test

Status
Not open for further replies.

dalin12

Programmer
Nov 4, 2004
2
0
0
US
Hello all...

apologies for the terribly simplistic request, but i cant for the life of me figure out why my simple 'hello world' .aspx file wont give me any results...

the page loads, but the c# portion simply isnt displayed...

here is the code in its entirety:
-----------------------------------------
<script language="c#" runat="server">
void Page_Load()
{
time.Text=DateTime.Now.Hour.ToString();
}
</script>

<html>
<head>
<title>Web Server Time</title>
</head>

<body>
The time is currently:
<asp:label id="time" runat="server" />
</body>
</html>
-----------------------------------------

when i launch the page, i get the "The time is currently" portion, but no actual time is displayed...

i've installed the .net redistributable, and the SDK (in that order)... ive got permissions all setup as well...

am i missing something here?

please let me know what other information i can provide...

thanks!
steve
 
your code looks fine. Make sure you have named the file correctly (filename.aspx). Try adding some other code, like
Response.Write("Some text");
within Page_Load, to see if it is executed at all.
And make sure that u request the page properly. Dont open it from the file menu, but type in the proper url (should be something like
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top