1 / 14

ASP.NET

ASP.NET. DR.JOHN ABRAHAM PROFESSOR UTPA. ACTIVE SERVER PAGES (ASP). Web application development environment Web applications use web browser to display Extensible hyperText Markup Language (XHTML) Client side scripting and server side scripting. What is ASP.

sheena
Télécharger la présentation

ASP.NET

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. ASP.NET DR.JOHN ABRAHAM PROFESSOR UTPA

  2. ACTIVE SERVER PAGES (ASP) • Web application development environment • Web applications use web browser to display • Extensible hyperText Markup Language (XHTML) • Client side scripting and server side scripting

  3. What is ASP • ASP.NET is a Microsoft Technology • ASP stands for Active Server Pages • ASP.NET is a program that runs inside IIS • IIS (Internet Information Services) is Microsoft's Internet server • IIS comes as a free component with Windows servers • IIS is also a part of Windows 2000 and XP Professional Slide from w3schools

  4. Multitier Application Architecture • Web based applications are multi-tier as functionality is divided into tiers, each tier may reside on different machines (or all on the same machine) • Data tier (bottom tier) – usually a RDBMS • Middle tier (business logic) – ASP.NET (web Server) • Top tier (user interface) – Browser

  5. Web Forms • Web applications written in ASP use special Web pages called Web forms. • Web form has .aspx file extension. • The source code for a web form is stored in a related file called code-behind file with file extension aspx.vb (this part contains the program logic)

  6. What is an ASP.NET file? • An ASP.NET file is just the same as an HTML file • An ASP.NET file can contain HTML, XML, and scripts • Scripts in an ASP.NET file are executed on the server • An ASP.NET file has the file extension ".aspx" Slide from w3schools

  7. ASPX file & VB file created by ASP 1. Creates an aspx file that contains XHTML code that contains runat = “server” Also code for creating controls are added. 2. Also creates VB code • Partial Public Class _Default • Inherits System.Web.UI.Page • Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load • lblTime.Text = Now.ToString("hh:mm:ss") • End Sub • End Class

  8. When a browser requests an HTML file, the server returns the file When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server The ASP.NET engine reads the file, line by line, and executes the scripts in the file Finally, the ASP.NET file is returned to the browser as plain HTML At run time

  9. Some example code • In class demo

  10. Creating a web application • From file choose new website, then asp.net website. • Set location to file system and browse to where you want to create it. • Choose language and press OK • A web page named default.aspx is automatically created • Behind code also is created with the .vb extension • Right clicking will allow you to go to design mode • At the bottom of the page you can choose between design and source code.

  11. Coding • Change the title of the page: In the source, change the title from untitled to whatever you want. • Now we will change the following body: <body> <form id="form1" runat="server"> <div> </div> </form> </body>

  12. Body Coding <body> <form id="form1" runat="server"> <div> <h2> Current Time on the Web Server:</h2> <p> <asp:Label ID="lblTime" runat ="server" BackColor = "Blue" EnableViewState="false" font-size="XX-Large" ForeColor="Yellow"></asp:Label> </p> </div> </form> </body>

More Related