Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.

Similar presentations


Presentation on theme: "Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12."— Presentation transcript:

1 Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12

2 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 2 Objectives Understand the relationship between HTML and ASP.NET Understand how web applications work in terms of the client/server model Develop ASP.NET applications using a text editor

3 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 3 Objectives (cont.) Develop ASP.NET applications using Visual Studio.NET Understand the similarities and differences between Windows Forms and Web Forms Develop interesting web applications using ASP.NET and Visual Studio

4 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall HTML and Static Web Pages HTML stands for Hypertext Markup Language, a language for displaying text in a web browser such as Internet Explorer or Netscape Navigator. Text is marked by tags consisting of a left angle bracket ( ).

5 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall HTML and Static Web Pages (cont.) Tags are usually paired to start and end the tag instruction. The end tag looks like the start tag except a slash (/) precedes the text with the brackets. Some tags can be used without an end tag.

6 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall HTML and Static Web Pages (cont.)

7 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Web Applications A web application is a client/server application that lives on a web server. The client is the user’s machine with an Internet browser. The web server is a machine that stores the web documents, including web pages and server scripts.

8 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 8 Round Trips Postback is when a user action occurs that requires server processing and the form is posted back to the server. The web server processes the request and generates new HTML that is returned to the client browser. This sequence of events is referred to as a round trip.

9 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 9 Round Trip (cont.)

10 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall ASP.NET ASP.NET is a platform for developing and running web applications on a web server. ASP.NET web applications can be developed with a simple text editor or with the assistance of Visual Studio.NET. Microsoft’s Internet Information Services (IIS) is a web server for use on Windows machines.

11 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Visual Studio and Web Forms Visual Studio provides the following tools: –Visual designers –Code-aware editors –Integrated compilation and debugging –Project management facilities for creating and managing application files

12 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Visual Studio and Web Forms (cont.) Visual Studio supports Web Forms to quickly and easily create the user interface for ASP.NET web applications. A Web Form is composed of two files, the user interface form and the code-behind file. Web Forms are similar to Windows forms in that they are event driven.

13 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Visual Studio and Web Forms (cont.)

14 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 14 ASP.NET Illustrated: Jake’s Problem Begin by starting a New Project and selecting ASP.NET Web Application. If Visual Studio is successfully able to communicate with the web server, then it will create a project on the server and open WebForm1.aspx for editing.

15 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 15 ASP.NET Illustrated: Jake’s Problem (cont.)

16 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 16 ASP.NET Illustrated: Jake’s Problem (cont.)

17 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 17 ASP.NET Illustrated: Jake’s Problem (cont.) The programming logic resides in a code- behind file with an.aspx.vb extension. The logic written in the code-behind could have been written with any.NET language such as C#. When the application is run Visual Studio launches Internet Explorer and connects to the ASPX page on the server.

18 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 18 ASP.NET Illustrated: Jake’s Problem (cont.)

19 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 19 ASP.NET Illustrated: Jake’s Problem (cont.)

20 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 20 Chapter Summary HTML stands for Hypertext Markup Language, a language for displaying text in a web browser such as Internet Explorer or Netscape Navigator. Web applications are web sites that go beyond normal, static web sites by adding the ability to process code in response to user input.

21 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 21 Chapter Summary (cont.) Web applications are also client/server applications. When a user action occurs that requires web server processing, the form must be posted back to the server. ASP.NET is a platform for developing and running web applications on the web server.

22 Crews/Murphy – Programming Right From the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 22 Chapter Summary (cont.) Web Forms allow quick and easy creation of ASP.NET web applications. Web Forms are similar to Windows Forms in that they are event driven.

23 Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12


Download ppt "Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12."

Similar presentations


Ads by Google