1 / 12

Web Form Fundamentals MacDonald Ch. 5

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 Code Declaration Block Code Render Block. 1. Page Directives. Set page properties

Download Presentation

Web Form Fundamentals MacDonald Ch. 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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: <script runat=“server”> //Server-side code here… </script> • 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: <% =strLastName %> • 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: • EnableViewState=“false” • 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

More Related