Professional Documents
Culture Documents
Lab 1
Lab 1
Lab #9
What Is Asp.Net?
ASP.NET is a part of Microsoft .Net platform. ASP.NET is a framework for creating websites,
apps and services with HTML, CSS and JavaScript.
ASP.NET application codes can be written in any of the following languages:
C#
Visual Basic.Net
Jscript
J#
An ASP.NET application consists of two major parts:
The .aspx file: this is essentially the GUI that you see on the web page.
The .cs file (code behind): this is essentially the code that executes the logic associated
with the GUI of the web pageIt consists of a large number of controls such as text boxes,
buttons, and labels for assembling, configuring, and manipulating code to create HTML
pages.
Visual Studio
Microsoft Visual Studio is an integrated development (IDE)from Microsoft environment. It can
be used to develop console and graphical user interface applications along with Windows
Forms applications, websites, webapplications, and web services in both native code together
with managed code for all platforms supported by Microsoft Windows.
Creating Website
1. Open Microsoft Visual Studio 2010 .
2.
In the File menu, click New -> Web Site. The New Web Site dialog box is displayed.
3.
Under Installed Templates, click Visual C# and then select ASP.NET Empty Web Site.
4.
In the Web location box, select File System, and then enter the name of the folder where you
want to keep the pages for your Web site.
For example, type the folder name C:\WebSites.
5.
Click OK.
Click on Solution
Explorer
A dialog box will open.Now Click on Web Form and select Visual C#.
Name of the
page e.g
Home.aspx
Solution Explorer
Solutions and projects contain items that represent the references ,data connections folders, and files
that you need to create your application. A solution container can contain multiple projects and project
container typically contains multiple items.
Toolbox
The Toolbox contains all the necessary controls ,etc. you need to create your user interface. In order to
use them in our user interface , we just drag and drop them to the Form ,as shown below:
Properties window
Each control we have on our user interface has lots of Properties we can set.
This is done in the Properties window:
Lab Task
Q1: Write simple ASP.NET program to display following web page.