asp.net seminar

22
ASP.NET Seminar February 16, 2013

Upload: nathan

Post on 23-Feb-2016

28 views

Category:

Documents


0 download

DESCRIPTION

ASP.NET Seminar. February 16, 2013. Aaron Cuffman [email protected] Andy Nagle [email protected] Adam Schultz [email protected] Web Site http://www.bthreesolutions.com. Objectives. Learn the fundamentals of Server-client relations and Page events - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ASP.NET Seminar

ASP.NETSeminar

February 16, 2013

Page 2: ASP.NET Seminar

Aaron [email protected]

Andy [email protected]

Adam [email protected]

Web Sitehttp://www.bthreesolutions.com

Page 3: ASP.NET Seminar

ObjectivesLearn the fundamentals of

Server-client relations and Page eventsSate managementControls and LayoutsDatabindingJavaScript and ASP.NET

Page 4: ASP.NET Seminar

ProceduresSeminar will consist of 5 Lessons & 5 LabsLabs are designed for individuals

Group work will be accommodatedEach Lab is self contained

If you are unable to complete a lab or partial seminar attendance occurs; labs can be completed on your own

Next lab will not require prior lab completionOpen Conversation

Object is to help you learn the material

Page 5: ASP.NET Seminar

Agenda9:00 – 9:30 Lesson 1: Introduction to ASP.NET9:30 – 10:00 Lab 210:00 – 10:30 Lesson 2: State Management10:30 – 10:45 Break10:45 – 11:15 Lesson 3: Standard SQL11:15 – 11:45 Lab 211:45 – 12:30 Break12:30 – 1:00 Lesson 3: Controls1:00 – 1:30 Lab 31:30 – 2:00 Lesson 4: Data Binding2:00 – 2:30 Lab 42:30 – 3:00 Lesson 5: JavaScript 3:00 – 3:30 Lab 53:30 – 4:00 Wrap Up

Page 6: ASP.NET Seminar

Introduction to ASP.NETAn adventure in TIME and SPACE!

Page 7: ASP.NET Seminar

What is ASP.NET?Web Application framework

Used in building dynamic web pagesBuilt on CLR

You can write ASP.NET code in any .NET language

C#, VB, etc. http://en.wikipedia.org/wiki/List_of_CLI_languages

Page 8: ASP.NET Seminar

What is ASP.NET?Gives the “feel” of building a WinForm/WPF

style page, but with web pagesCan be misleading if you haven’t seen the page

life cycle [EPIC FORECHADOWING] which we will cover soon.

Page 9: ASP.NET Seminar

Design vs Code BehindASPX (Design) and .CS/.VB (Code Behind)Separates display from business logic

Makes it easy to have multiple people working on the same page

Designer working on the designer pageProgrammer working on the Code Behind

Not restricted to using Visual StudioEx: Blend http://msdn.microsoft.com/en-us/library/windows/apps/jj129478.aspx

Page 10: ASP.NET Seminar

Design vs Code BehindASPX page

The “designer” view. This describes the layout of the page

Code Behind PageResponds to events from the designer viewPage logic goes here

Redraw the page, make new queries, show/hide page sections

Page 11: ASP.NET Seminar

Request PathTwo major roles. Client and ServerClient

Makes requests to the serverServer

Turns requests into HTML pages (or files, or media)

Page 12: ASP.NET Seminar
Page 13: ASP.NET Seminar

Page Life CycleOnce a server receives a request for a page,

it needs to render that pageTakes the ASPX file plus the code for the

events and turns them into HTML

Page 14: ASP.NET Seminar
Page 15: ASP.NET Seminar

Pre InitRaised after the start stage is complete and

before the initialization stage begins.Used to:

Create dynamic controlsSet master pageSet themesInitialize page content before Init

Page 16: ASP.NET Seminar

InitRaised after all controls have been initialized

and any skin settings have been appliedThe Init event of individual controls occurs

before the Init event of the page.Used to:

Initialize controls before LoadLast chance to do anything before the

ViewState is loaded

Page 17: ASP.NET Seminar

LoadThe Page object calls the OnLoad method on

the Page object, and then recursively does the same for each child control until the page and all controls are loaded.

Used to:Set Properties for controlsEstablish Database Connections“ready” your page

Page 18: ASP.NET Seminar

Control EventsButton Click, Checkbox Changed, Textbox

Changed, etc.These events are processed in the order they

occur

Page 19: ASP.NET Seminar

Pre RenderRaised after the Page object has created all

controls that are required in order to render the page

Last chance to change anything before rendering the page

Page 20: ASP.NET Seminar

RenderThis is not an event; instead, at this stage of

processing, the Page object calls this method on each control.

Turns Controls into markup to send to the browser

If you create a custom control, you typically override this method to output the control's markup.

Page 21: ASP.NET Seminar

UnloadRaised for each control and then for the

page.Used as final cleanup for controlsAt the end of this process, the page is

destroyed.During the unload stage, the page and its

controls have been rendered, so you cannot make further changes to the response stream.

Page 22: ASP.NET Seminar

Page Life CycleMuch more information on MSDN

http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx