ASP.NET Web Forms > Introduction

ASP.NET application using Notepad in ASP.NET Web Forms

How to create and run the first ASP.NET application using Notepad


All codes in .NET Framework can be written using Notepad, here we will see how to write a sample asp.net web page in notepad. Open notepad and write following code and save this file as default.aspx in “Demo” folder. 

<%@ Page Language="C#" %>
<script language="C#" runat="Server">
void Page_Load(object sender, EventArgs e)
{
lblMessage.Text = "Hello World !";
}
</script>
<html>
<head>
<title>First ASP.NET page written in Notepad</title>
</head>
<body>
<asp:Label ID="lblMessage" runat="Server" />
</body>
</html>

Now create a virtual directory (steps of creating virtual directory differs in different versions of IIS) in your IIS and point to the Demo folder and browse it by providing your localhost address in your browser, you should see “Hello Wordl !” something like this

(The purpose of this step is to demonstrate that the asp.net code can be written in notepad as well, however you are not suggested to do that for the simple reason that it is very tedious to write a full fledge asp.net website code in notepad.)

 Views: 15346 | Post Order: 4



Write for us






Hosting Recommendations