-->
ads here

Creating sample ASP.NET Website

advertise here

Intro:
Here,Now i am going to explain how to Creating a simple asp.net website in C# and VB .
Description:
Steps to be follow:

1.Open microsoft visual studio(Here i use V2008)
2.Click file->New->Web Site Option,as shown in the following figure.





New website dialog box appears as like above.
3.Select Asp.Net web site in the Templates plane and set the location and language of the website.Then click ok button



4.Now,open the code-behind file by pressing the F7 Key,the (Default.aspx.cs)
window appears as below.

In C#

<%@ 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>Sample Website</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>

Now the code-behind for the default.aspx page,looks like below


using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 

{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("Welcome to asp-dot-net-tutorials");
    }
}

Press f5 key to get the Output


If the application is developed using C# or Vb,the Output must be same.






Advertisement
BERIKAN KOMENTAR ()