.NET Tutorials Part 3  

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. Don’t 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.


Home  • MSDN Blog  • Professional Biography  • Personal Biography  • Articles  • Technology  • White Papers  • Downloads  • Contact  • Terms of Use  • Site Map

Channel9  • Spock  • Google  • Programmer's Heaven  •  Variable Markup  • Wuup.de  • Pure  • Net Informations  • San24  • Yahoo Profile  • Excite UK  • Imprese  • NodeWorks  • Travel.com  • Amazon  • Geocities  • T-Links  • SearchBug  • Katalog  • Alexa Search  • Alexa Details  • 15 Seconds  • Blogwise  • Yahoo Profile  • FindArticles  • Julson  • Google Search  • Programmers Heaven author  • Alexa Browse  • MSN  • C9  • Eaton FL  • LinkSpider  • Macopinion  • Italy Link  • DerKeiler  • Programming-X  • CitiBay  • 15S  • Wils Domain  • AdvOL  • Computers Global  • TutorGig  • TGZ  • MV-S  • Deerlake  • mkiwi  • UKFindit • MWTT  • NetInfo • BSC  • WebBozo  • CVCS  • HotLaunch  • Escanaba • Google • FotoPages  • Conk  • InfoBase  • ExciteUK  • Angelfire  • BlogWise  • Canadian Content  • Opera Portal  • oStats  • 411 ASP  •  Interactiva  • Data Mining  • Call Center Forecasting  •  Accounting  • Guitar  • Computers Global  • BIE  • NewsIsFree Alph  • PX Java  • Trexle  • So-Ft  • DMOZ  • Programmer's Heaven Articles  • DotNetKuwait