Web Form Fundamentals MacDonald Ch. 5 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Web Form Fundamentals MacDonald Ch. 5

Description:

Web Form Fundamentals MacDonald Ch. 5 MIS 324 Professor Sandvig Outline Web Forms Three sections Order of Execution Viewstate Web Forms Three Sections Page Directives ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 13
Provided by: Collegeo176
Category:

less

Transcript and Presenter's Notes

Title: Web Form Fundamentals MacDonald Ch. 5


1
Web Form FundamentalsMacDonald Ch. 5
  • MIS 324
  • Professor Sandvig

2
Outline
  • Web Forms
  • Three sections
  • Order of Execution
  • Viewstate

3
Web Forms
  • Three Sections
  • Page Directives
  • Code Declaration Block
  • Code Render Block

4
1. Page Directives
  • Set page properties
  • Language, debugging, tracing,
  • Import additional class libraries
  • Common ones imported automatically
  • Additional
  • Database access, data manipulation, web services,
    drawing, communication

5
2. Code Declaration Blocks
  • Syntax
  • ltscript runatservergt
  • //Server-side code here
  • lt/scriptgt
  • Locate
  • Anywhere on page ? usually at top
  • Another file ? Code-Behind

6
3. Code Render Block
  • Contain
  • HTML
  • Text
  • Server Controls
  • Typically located below Code block
  • Location does not affect output

7
Code Render Block
  • Can include ASP/PHP style tags
  • Syntax lt strLastName gt
  • Not used much in ASP.NET

8
Outline
  • Web Forms
  • Three sections
  • Order of Execution
  • Viewstate

9
Order of Execution
  • .NET is event driven
  • Events include
  • Page load
  • Button click
  • checkbox checked
  • textbox text changed
  • etc.
  • We write handlers (methods) to handle events
  • Events fired in sequence
  • Page Life Cycle overview (for the curious)
  • Examples
  • PostBack.aspx handout

10
Outline
  • Web Forms
  • Three sections
  • Order of Execution
  • Viewstate

11
ViewState
  • Saves control data
  • Encoded in hidden form field
  • Benefit convenience
  • Disadvantage
  • Processing overhead
  • Bandwidth
  • NovusHR
  • Turn off with
  • EnableViewStatefalse
  • Individual controls
  • Page (in page directive)

12
Summary
  • .NET Framework
  • Like a huge Lego set
  • 5,000 types of pieces
  • Mix and match pieces to build most anything
  • Easily extended
  • Add new classes
  • Support for many languages platforms
Write a Comment
User Comments (0)
About PowerShow.com