| Part 3: Your first
ASP.NET page
Now that your system is set up lets create a simple test ASP.NET
page. Go to your Documents tab on the web site properties
page and move Default.aspx to the top of the Default
Documents list.
Next, open Notepad, create a document and save it to your web
root ( e.g. C:\Inetpub\C Sharp) called Default.aspx.
We will start working in Visual Studio in the next lesson. Dont
forget, to select the All Files option in the Save
As Type pull-down menu. If you save the document with
the Text Documents (*.txt) option selected it will
save the file as Default.aspx.txt which is a txt
document.
Now enter
<%@ Page Language="C#" %>
<html>
<head><title>C# Test</title>
<body><p>Test<br>
<% Response.Write("Hello World, my first ASP.NET page");
%>
</P>
</body>
</html>
Now open a browser and go to http://localhost/
If you have forgotten a curly brace, left off the semicolon
or made some other mistake you will see that the error pages
have gotten a lot better and more descriptive. If you have not
made a mistake, experiment by messing up your code. One interesting
feature is that ASP .NET produces different, more detailed error
messages when you are browsing from the host then on a remote
client.
|