1 / 40

Module 1 : An Introduction to ASP.NET

Module 1 : An Introduction to ASP.NET. Contents. .NET Framework and VS.NET Introduction to ASP.NET Advantage Features of ASP.NET Internet Information Services (IIS) Virtual Directory Introduction to Webform Visual Studio Web Site Types ASP.NET Directives. What is the .NET Framework?.

Download Presentation

Module 1 : An Introduction to 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. Module 1 : An Introduction to ASP.NET

  2. Contents • .NET Framework and VS.NET • Introduction to ASP.NET • Advantage Features of ASP.NET • Internet Information Services (IIS) • Virtual Directory • Introduction to Webform • Visual Studio Web Site Types • ASP.NET Directives

  3. What is the .NET Framework? Developer Tools Clients ASP.NET Web Applications Databases XML Web Services User Experiences .NET Framework

  4. What Problems Does .NET Solve? • Even with the Internet, most applications and devices have trouble communicating with each other • Programmers end up writing infrastructure instead of applications • Programmers have had to limit their scope or continually learn new languages

  5. The .NET Framework Components Message Queuing COM+ (Transactions, Partitions, Object Pooling) IIS WMI Visual Basic C++ C# Perl Python … XML Web Services User Interface ASP.NET ADO.NET and XML .NET Framework Class Library Common Language Runtime Win32

  6. Benefits of Using the .NET Framework MFC/ATL .NET Framework Windows API Visual Basic ASP 1990’s 2000’s 1980’s • Based on Web standards and practices • Functionality of .NET classes is universally available • Code is organized into hierarchical namespaces and classes • Language independent

  7. Visual Studio .NET: The Tool for .NET Development Web Forms Tools Windows Forms Tools Visual Studio .NET Multiple Languages Error Handling Web Services Tools Data Access Design Develop Debug Deploy

  8. Introduction to ASP.NET • Microsoft introduced Active Server Pages in December 1996. Microsoft made it available for its Internet Information Server (IIS) • ASP Page is saved with an extension of .asp • ASP code can be written in VBScript or Jscript • An Active Server Page is like a standard HTML file, and can contain HTML tags that will not be interpreted by the server, they are sent to the browser along with the plain HTML generated from the ASP code embedded in it

  9. Introduction to ASP.NET • ASP.NET is a part of the new framework for Internet functionality in .NET • ASP.NET has been designed to provide the features, which were not covered in ASP, as it has been built on common language runtime that can be used on a server to build powerful web Applications

  10. Advantage Features of ASP.NET • Better Performance : An ASP.NET file is compiled only the first time it is accessed. If the page has been sent back then, only modified area is read at server • Simplicity : ASP.NET framework allows you to create a web application that cleanly separates application logic from presentation code • Language support : Object Oriented Language : C# , VB.NET

  11. Advantage Features of ASP.NET • Security : ASP.NET supports Windows ,HTML forms and Passport based authentication • Caching : Caching is a technique that is used widely to increase the performance by keeping frequently accessed or expensive data in memory (3 types of caching : Output ,Data, Fragment Caching)

  12. Multimedia: ASP.NET Execution Model

  13. Internet Information Services (IIS) • Software intergrated with Windows OS to manage all Web Applications • Start at : Control Panel Administrative Tools  Internet Information Services

  14. Virtual Directory • Main Web Directory located at : C:\InetPub\wwwroot\ • Virtual Directory is a virtual directory in sense that it doesn’t exist. It only maps with the existing directory, which contains real files

  15. Virtual Directory • Create Virtual Directory Using IIS

  16. Virtual Directory • Create Virtual Directory Using IIS

  17. Virtual Directory • Create Virtual Directory Using IIS

  18. Webform • ASP.NET web forms are nothing but text files, saved with an extension of .aspx • As you have already seen, the web forms can be created in the following three ways: • Notepad • FrontPage • Visual Studio .NET

  19. Webform • Features: • Browser-independent applications : Web Forms provide a framework for creating all application logic on the server, eliminating the need to explicitly code for different browsers and their capabilities • Event-based programming model : Web Forms bring to Web applications the model of writing event-handling methods for events that occur in either the client or server

  20. Webform • Features: • State management : The Web Forms framework automatically handles the task of maintaining the state of your form and its controls • Scalable server performance : The Web Forms framework allows you to scale your application from one computer with a single processor to a multi-computer Web farm cleanly and without complicated changes to the application's logic

  21. Visual Studio Web Site Types • You can use Visual Studio 2005 to create any of the following Web site types: • File-system Web sites • Local Internet Information Services (IIS) Web sites • Remote IIS Web sites • FTP sites

  22. Default Event Handling in Web Applications • Many ASP.NET objects support multiple events • Objects with multiple events usually supporta default event • Visual Studio 2005 and ASP.NET provide multiple ways for working with events • Visual Studio 2005 provides quick access todefault events

  23. Create ASP.NET Web application • Using Visual Studio .NET

  24. Why Visual Studio .NET? • One IDE for multiple languages and multiple project types • Multiple languages within a project • Multiple project types within a solution • Integrated browser • Debugging support • Customizable interface

  25. Start Page • Online support access • Recent projects

  26. Practice: Select the Project Template

  27. Integrated Development Environment (IDE) SolutionExplorer Editor/Browser Object Browser Toolbox Properties Dynamic Help

  28. Visual Studio .NET • The advantage of using Visual Studio is that it provides tools that make web Application development much faster, easier, universally readable and much more robust. These tools include: • Visual designers • Code-aware editors • Integrated compilation and debugging • Project management

  29. File Types • *.aspx : webform file • *.aspx.vb (.aspx.cs) : code behind file • Web.config : web application configuration file • Global.asax : application event file

  30. Web Configuration Files • Web application settings are contained in XML-based configuration files • Server settings—machine.config • Root Web setting—web.config • Web site settings (optional)—web.config • ASP.NET application root settings (optional)—web.config • ASP.NET application subfolder (optional)—web.config • Effective settings are provided by merging settings in the configuration hierarchy • Web Site Administration Tool for Visual Studio 2005 can be used to modify application configuration files

  31. Webform model • All webform class inherits from System.Web.UI.Page : • Page. IsPostBack : Gets a value indicating whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time • Page.Response.Write (string) : Write a document line to webform

  32. Webform Life Circle • Page_Init : the first event, controls have not finished loaded • Page_Load : controls have finished loaded • Page_Unload : Before page closing • Controls event : ex Button_Click

  33. Understanding the Page Event Life Cycle Page is disposed Page_Init Page_Load Control events Textbox1_Changed Change Events Button1_Click Action Events Page_Unload

  34. Visual Studio Web Site Types • File-system Web sites • Local IIS Web sites • Remote IIS Web sites • FTP sites

  35. Default Event Handling in Web Applications • Many ASP.NET objects support multiple events • Objects with multiple events usually supporta default event • Visual Studio 2005 and ASP.NET provide multiple ways for working with events • Visual Studio 2005 provides quick access todefault events

  36. ASP.NET Directives • ASP.NET supports few directives, which are used to specify optional settings used by the page compiler when processing ASP.NET files • These directive can be placed anywhere in the page but conventionally these are placed at the top of the file .aspx <%@ directive attribute=value [attribute=value …] %>

  37. ASP.NET Directives • Some of directive : Page, Control, OutputCache, Register… • Directive Page : one per webform <%@ Page Language="vb" AutoEventWireup="false“ Codebehind="WebForm1.aspx.vb" Inherits="WebForm1“ %>

More Related