ASP.NET Lab 1

Embed Size (px)

Citation preview

  • 7/25/2019 ASP.NET Lab 1

    1/10

    Web EngineeringLab #9

  • 7/25/2019 ASP.NET Lab 1

    2/10

    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 WindowsForms applications, websites, webapplications, and web services in both native code together

    with managed code for all platforms supported by Microsoft Windows.

  • 7/25/2019 ASP.NET Lab 1

    3/10

    Creating Website

    1. Open Microsoft Visual Studio 2010 .

    2. In the Filemenu, click New -> Web Site. The New Web Sitedialog box is displayed.

    3. Under Installed Templates, click VisualC#and then select ASP.NET Empty Web Site.

  • 7/25/2019 ASP.NET Lab 1

    4/10

    4. In the Weblocationbox, 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.

    7.A new window will open as given below.

  • 7/25/2019 ASP.NET Lab 1

    5/10

    8. Click on Solution Explorer.

    Now right click on C:\...Website1\ ->Add New Item

    Click on Solution

    Explorer

  • 7/25/2019 ASP.NET Lab 1

    6/10

    A dialog box will open.Now Click on Web Form and select Visual C#.

  • 7/25/2019 ASP.NET Lab 1

    7/10

    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.

    Name of the

    page e.gHome.aspx

  • 7/25/2019 ASP.NET Lab 1

    8/10

    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

  • 7/25/2019 ASP.NET Lab 1

    9/10

    Each control we have on our user interface has lots of Properties we can set.

    This is done in the Properties window:

    Design And Source Window

    Lab Task

    Q1:Write simple ASP.NET program to display following web page.

  • 7/25/2019 ASP.NET Lab 1

    10/10