Introduction:
This tutorial illustrates how to create your very first aspx page. To start developing an ASP.net application you should have basic understanding of HTML. No previous knowledge of ASP technology is required, because ASP or Classic ASP works on entirely different concept as compared to ASP.net. As ASP.net is advance form and it build on entirely new concept of .Net framework. In this article, I have used Microsoft Visual Studio Professional Edition 2005.
Step 1:
Start Visual studio 2005 and Select File > New > Website.
Step 2:
A dialog Box will appear , In which you have to select ASP.Net Website option from Templates. This will create a blank ASP.Net Website.
Step 3:
Choose [File System] option from the location Drop down menu and in language menu choose [Visual C#]. Now enter the location & Name of Website, then Click OK button. By default the site name will be Website1, if you have not created any application previously. Change it to MyWebsite. The new path will be like: C:\Documents and Settings\UserName\My Documents\Visual Studio 2005\Projects\MyWebsite.
Code:
[Default.aspx Page]
<%@ Page Language="C#" AutoEventWireup="true" CodeFile= "Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns="http://www.w3.org/1999/xhtml >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
[Default.aspx.cs Page]
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{}
}
0 comments
Post a Comment