St. Ambrose CSCI 275 - Using Web Forms

Unformatted text preview:

Chapter 6 Using Web Forms ASP.NETWhy ASP.NET?Windows or Web Forms?Client/Server Web ApplicationsBrowser SupportWeb PagesASP.NETVisual Basic and ASP.NETFile Types in a Web ProjectSlide 10The ASP.NET Application FileSlide 12Cascading Style SheetsUsing StylesThe Default CSS FileModifying StylesApplying the StylesWeb Configuration FileSlide 19Slide 20DLL FilesCreating a Web Forms ProjectWeb Forms in the Visual Studio IDESlide 24Naming a Web FormWeb Controls / Maintaining State / ValidationControlsWeb Server ControlsEvent HandlingButton ControlsThe Hyperlink ControlSetting the Navigate Url Property at Design TimeChoosing the Right Navigation ControlThe Calendar ControlSlide 35The Background ImageSetting the Tab OrderSetting Initial FocusIIS ObjectsLinking to Another PageThe Validator ControlSlide 42Displaying AsterisksSlide 44Testing for ValidityA Response ObjectA Request ObjectA Response Object ExampleState ManagementSlide 50Overview of State Management Techniques – Server SideOverview of State Management Techniques – Client SideApplication and Session ObjectsSession ObjectsSlide 55Cookieless SessionsCookiesThe ViewState PropertyLocation of FilesChapter 6 Chapter 6 Using Web Using Web Forms Forms ASP.NETASP.NETAdvanced Programming Using Advanced Programming Using Visual Basic.NETVisual Basic.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.22Why ASP.NET?Why ASP.NET?Full power of the .NET language suiteFull power of the .NET language suite.dll’s multithreaded.dll’s multithreaded.NET class libraries available.NET class libraries availableIncreased speed an powerIncreased speed an powerSupports all the functionality of Supports all the functionality of classical ASP +classical ASP +33Windows or Web Forms?Windows or Web Forms?Windows Form applications run on Windows Form applications run on systems with Windows operating systems with Windows operating systemssystemsWeb Forms are the gateway to cross-Web Forms are the gateway to cross-platform developmentplatform development–Support for distributed applicationsSupport for distributed applications–Display in a browser applicationDisplay in a browser application–Connect via an Internet Service Provider Connect via an Internet Service Provider (ISP)(ISP)44Client/Server Web Client/Server Web ApplicationsApplicationsThe Web server sends Web pages to The Web server sends Web pages to the clientthe client–Make the development machine a Make the development machine a server with Internet Information server with Internet Information Services (IIS).Services (IIS).–IIS handles the Web server functionsIIS handles the Web server functionsWeb ClientsWeb Clients–The browser acts as the clientThe browser acts as the client–Pages are written in HTML and scriptPages are written in HTML and script55Browser SupportBrowser SupportASP.NET applications run best in ASP.NET applications run best in Internet ExplorerInternet ExplorerUplevel browsersUplevel browsers – IE 5.5 and above – IE 5.5 and aboveDownlevel browsersDownlevel browsers – IE 5.05 and – IE 5.05 and below and all other browsersbelow and all other browsersASP.NET is aware of the browser ASP.NET is aware of the browser running the application running the application –HTML is customized ie. CSSHTML is customized ie. CSS66Web PagesWeb PagesHTML Web pages are statelessHTML Web pages are stateless–A page does not store any information about its A page does not store any information about its contents from one invocation to the nextcontents from one invocation to the nextTo send state information to the server as To send state information to the server as part of the URL, store “cookies” on the part of the URL, store “cookies” on the local machinelocal machineServers dynamically generate HTML to Servers dynamically generate HTML to render a pagerender a page–Using DHTML (dynamic HTML)Using DHTML (dynamic HTML)–Using ASP (active server pages)Using ASP (active server pages)77ASP.NETASP.NETWeb development tool that replaces ASPWeb development tool that replaces ASP–Libraries, controls, and programming supportLibraries, controls, and programming supportWhen you use Web forms in Visual When you use Web forms in Visual Basic.NET, you’re using ASP.NETBasic.NET, you’re using ASP.NETUse VB and ASP.NET to create OOED Use VB and ASP.NET to create OOED programs with multiple classes that use programs with multiple classes that use inheritanceinheritanceWeb ApplicationsWeb Applications88Visual Basic and ASP.NETVisual Basic and ASP.NETEach Web form has 2 distinct partsEach Web form has 2 distinct parts1.1.HTML and instructions to render the HTML and instructions to render the pagepage–Generates a file with Generates a file with .aspx.aspx extension extension–HTML is generated automatically by the IDEHTML is generated automatically by the IDE2.2.Visual Basic codeVisual Basic codeGenerates a file with an Generates a file with an .aspx.vb.aspx.vb extension extensionProgram logic to respond to event – the Program logic to respond to event – the “CodeBehind” module“CodeBehind” moduleWeb ApplicationsWeb Applications99File Types in a Web ProjectFile Types in a Web ProjectTwo files make up the Two files make up the form - .aspx and form - .aspx and aspx.vbaspx.vb.aspx file holds the .aspx file holds the specifications for the specifications for the user interface used by user interface used by the server to render the server to render the page the page (FormName.aspx)(FormName.aspx).aspx.vb file holds the .aspx.vb file holds the VB source code VB source code (FormName.aspx.vb)(FormName.aspx.vb)Files in Web ProjectsFiles in Web Projects1010File File Type PurposeFormName.aspx ASP.NET Dynamically generates a Web user interface allowing for server-side code.FormName.aspx.vb Visual Basic Code Supplies the code procedures for the form. The "code-behind" the aspx file.AssemblyInfo.vb Project information Holds information about the project such as assembly names and versions.ProjectName.vsdisco XML discovery file. Holds links (URLs) to help locate the necessary Web services.Global.asax ASP.NET application file Supplies any code needed to respond to Application- and Session-level events.Styles.css Cascading Style Sheet Formats and positions Web page elements.Web.config Configuration Contains configuration information about each URL resource used in the project.1111The


View Full Document

St. Ambrose CSCI 275 - Using Web Forms

Download Using Web Forms
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Using Web Forms and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Using Web Forms 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?