ASP.NET Getting started more detail - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

ASP.NET Getting started more detail

Description:

using System.Collections; using System.ComponentModel; using ... region Web Form Designer generated code #endregion. INT422. 13. Inherits System.Web.UI.Page ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 14
Provided by: peter868
Category:
Tags: asp | net | detail | getting | more | started

less

Transcript and Presenter's Notes

Title: ASP.NET Getting started more detail


1
ASP.NETGetting started more detail
2
WOW! factors
  • Too many to list
  • Heres a few favorites
  • Code-behind programming model
  • Easy and fast development
  • Automatic code generation
  • Any browser, any device
  • Reliable
  • Compiled applications fast fast fast the
    fastest web platform that exists today (bar none)

3
WOW! factors (continued)
  • Favorites (continued)
  • Language-neutral
  • Can inherit from other classes even if they were
    written in a different language
  • Great development tool (VS .NET)
  • Applications feel solid and fast
  • Server-side web controls
  • Server-side validation, complemented by
    client-side validation code that is written for
    you

4
WOW! factors (continued)
  • Favorites (continued)
  • Great state management
  • Great authentication and authorization
    infrastructure
  • Great connectivity to databases
  • Based upon and takes advantage of Internet
    standards
  • Rich functionality
  • Security is built in
  • XML Web Services
  • Can access functionality in over 6,500 base
    classes

5
The best ASP.NET WOW! factor
  • Code-behind development
  • This development model separates
  • presentation code
  • from
  • application code

6
Demos and discussion
  • Getting started
  • with ASP.NET

7
Tour of ASP.NET
  • Highlights
  • File gt Open Web Site
  • Your home directory ASP.NET Web Application
  • Web form
  • webform.aspx
  • Code-behind file
  • webform.aspx.cs
  • Build process (compile)
  • Keyboard shortcut is CtrlShiftB
  • Or File gt View In Browser

8
File gt Open gt Project From Web
  • ASP.NET Web Application
  • The URL includes the location and the web app
    name
  • The Location the web server
  • The Web App Name the alias/name of your app

9
Whats in an ASP.NET application?
  • VS .NET automatically adds essential project
    references (to class libraries) and files needed
    to get started
  • References (to class libraries)
  • System and System.Data
  • System.Web, System.Drawing, and System.XML
  • Files
  • WebForm1.aspx user interface code
  • WebForm1.aspx.cs class file that contains the
    system- and user-generated source code (e.g. C)
  • Web.Config application configuration settings

10
The VS .NET app dev environment
  • Design view has two tabbed panels visible
  • Design
  • WYSIWYG editor
  • HTML
  • The HTML code
  • The design surface offers two page layout modes
  • Grid Layout
  • Flow Layout (use this one!)

11
Code behind
  • Every web form also has a code-behind file
  • It contains the .NET language code
  • Example name WebForm1.aspx.cs
  • When you open a web form, its code-behind file
    does NOT automatically open
  • To open it, double-click on an empty area of the
    design surface (or press F7)
  • If you double-click on one of the controls, it
    will open the code-behind file with the cursor
    positioned inside the code block that implements
    the control

12
Code-behind file structure
  • using System
  • using System.Collections
  • using System.ComponentModel
  • using System.Data
  • using System.Drawing
  • using System.Web
  • using System.Web.SessionState
  • using System.Web.UI
  • using System.Web.UI.WebControls
  • using System.Web.UI.HtmlControls
  • namespace MySolution
  • /// ltsummarygt
  • /// Summary description for WebForm1.
  • /// lt/summarygt
  • public class WebForm1 System.Web.UI.Page
  • protected System.Web.UI.WebControls.Label
    lbl_Label
  • protected System.Web.UI.WebControls.HyperLink
    hpl_Linktopage

13
Inherits System.Web.UI.Page
  • When you are creating a web form (aspx), you are
    writing a class
  • Your web form inherits from a System.Web.UI.Page
    class in the .NET Framework
  • The Page object serves as the naming container
    for all server controls in a page
  • Server controls?
  • The form control, which holds
  • Buttons, labels, textboxes, list controls, etc.
Write a Comment
User Comments (0)
About PowerShow.com