Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Intro to asp.net

5,601 views

Published on

Published in: Technology
  • Be the first to comment

Intro to asp.net

  1. 1. Intro to ASP.NET By Slaveyko Ingilizov
  2. 2. Outline <ul><li>What is ASP.NET </li></ul><ul><li>What do we need to start </li></ul><ul><li>Pros and Cons </li></ul><ul><li>What’s new in ASP.NET 2.0 </li></ul><ul><li>Architecture </li></ul><ul><li>Syntax </li></ul><ul><li>Server Controls </li></ul><ul><li>Code-behind </li></ul><ul><li>Validation Controls </li></ul>11 Oct 2006 Intro to ASP.NET
  3. 3. What is ASP.NET? <ul><li>Successor of ASP (Active Server Pages) </li></ul><ul><li>ASP.NET is not a scripting language or a programming language </li></ul><ul><li>“ Programming framework built on the common language runtime that can be used on a server to build powerful web applications” - Microsoft </li></ul>11 Oct 2006 Intro to ASP.NET
  4. 4. What do we need? <ul><li>Web Server </li></ul><ul><ul><ul><li>IIS 5 / IIS 6 (Internet Information Services) </li></ul></ul></ul><ul><ul><ul><li>Apache (using mod_mono from MONO project) </li></ul></ul></ul><ul><ul><ul><li>XSP standalone web server, also from MONO </li></ul></ul></ul><ul><li>.NET Framework </li></ul><ul><li>Text editor or IDE </li></ul>11 Oct 2006 Intro to ASP.NET
  5. 5. Pros and Cons <ul><li>Better performance – Compiled code </li></ul><ul><li>.NET Framework class library </li></ul><ul><li>Multi language support </li></ul><ul><li>Simplicity </li></ul><ul><li>Separation of logic and presentation </li></ul>11 Oct 2006 Intro to ASP.NET
  6. 6. What’s new in ASP.NET 2.0 <ul><li>New Server Controls </li></ul><ul><li>Master Pages </li></ul><ul><li>Themes and Skins </li></ul><ul><li>64-bit Support </li></ul><ul><li>Caching Improvements </li></ul><ul><li>Admin and Management Tools </li></ul><ul><li>… </li></ul>11 Oct 2006 Intro to ASP.NET
  7. 7. ASP.NET Architecture <ul><li>Web clients (browsers) communicate with IIS </li></ul><ul><li>IIS communicates with ASP.NET engine </li></ul><ul><li>The ASP.NET engine communicates with the .NET Framework </li></ul>11 Oct 2006 Intro to ASP.NET
  8. 8. ASP.NET Page Processing <ul><li>Browser makes a HTTP request </li></ul><ul><li>The web server (IIS) receives the request </li></ul><ul><li>IIS examines the request and routes it to the appropriate engine </li></ul><ul><li>ASP.NET engine generates output and sends it back to the browser </li></ul>11 Oct 2006 Intro to ASP.NET
  9. 9. IIS Installation and Configuration Demo 11 Oct 2006 Intro to ASP.NET
  10. 10. Recap <ul><li>What is ASP.NET </li></ul><ul><li>What do we need to start </li></ul><ul><li>Pros and Cons </li></ul><ul><li>What’s new in ASP.NET 2.0 </li></ul><ul><li>Architecture </li></ul><ul><li>Syntax </li></ul><ul><li>Server Controls </li></ul><ul><li>Code-behind </li></ul><ul><li>Validation Controls </li></ul>11 Oct 2006 Intro to ASP.NET
  11. 11. Basic Syntax <ul><li>ASP-like: <% … %> </li></ul>11 Oct 2006 Intro to ASP.NET <% for (int i=3; i<7; i++) { %> <font size=&quot;<%=i%>&quot;>Welcome to ASP.NET</font> <br/> <% } %> <font size=&quot;3&quot;>Welcome to ASP.NET</font> <br/> <font size=&quot;4&quot;>Welcome to ASP.NET</font> <br/> <font size=&quot;5&quot;>Welcome to ASP.NET</font> <br/> <font size=&quot;6&quot;>Welcome to ASP.NET</font> <br/>
  12. 12. Basic Syntax Demo 11 Oct 2006 Intro to ASP.NET
  13. 13. Code-behind <ul><li>Not present in old ASP </li></ul><ul><li>Separates logic from presentation </li></ul>11 Oct 2006 Intro to ASP.NET <%@ page language=&quot;C#&quot; CodeFile=&quot;CodeBehind_cs.aspx.cs&quot; Inherits=&quot;CodeBehind_cs_aspx&quot; %> using System; public class CodeBehind_cs_aspx : System.Web.UI.Page { protected void Button1_Click(object sender, EventArgs e) { Label1.Text = &quot;Hello &quot; + TextBox1.Text; } }
  14. 14. Code-behind Demo 11 Oct 2006 Intro to ASP.NET
  15. 15. Server Controls <ul><li>Look just like HTML form controls </li></ul><ul><li>Retain their values after postback </li></ul><ul><li>Control’s Attributes can be Accessed on the Server </li></ul><ul><li>Available to use from the .NET class library </li></ul><ul><li>Need two attributes: </li></ul><ul><ul><li>ID=“name_of_control” </li></ul></ul><ul><ul><li>runat=“server” </li></ul></ul>11 Oct 2006 Intro to ASP.NET
  16. 16. Server Controls Demo 11 Oct 2006 Intro to ASP.NET
  17. 17. Validation Controls <ul><li>New in ASP.NET </li></ul><ul><li>Perform form input validation </li></ul><ul><li>Several types: </li></ul><ul><ul><li>Required Field Validator </li></ul></ul><ul><ul><li>Range Validator </li></ul></ul><ul><ul><li>Compare Validator </li></ul></ul><ul><ul><li>Regular Expression Validator </li></ul></ul><ul><ul><li>Custom Validator </li></ul></ul><ul><ul><li>Validation Summary </li></ul></ul>11 Oct 2006 Intro to ASP.NET
  18. 18. Validation Controls Demo 11 Oct 2006 Intro to ASP.NET
  19. 19. What next? <ul><li>Data access using ADO.NET </li></ul><ul><li>Styles, themes and skins </li></ul><ul><li>Master Pages </li></ul><ul><li>Security </li></ul><ul><li>Caching </li></ul><ul><li>Site Navigation </li></ul>11 Oct 2006 Intro to ASP.NET
  20. 20. References <ul><li>http://www.asp.net </li></ul><ul><li>http://www.directionsonmicrosoft.com/ </li></ul><ul><li>http://aspalliance.com </li></ul><ul><li>http://aspnet.4guysfromrolla.com/ </li></ul><ul><li>http://www.123aspx.com/ </li></ul><ul><li>http://www.aspnetresources.com/ </li></ul><ul><li>http://www.aspexperts.com/ </li></ul><ul><li>http://www.dotnetspider.com/tutorials/AspNet-Tutorials.aspx </li></ul><ul><li>http://www.15seconds.com/ </li></ul><ul><li>http://www.aspdev.org/ </li></ul>11 Oct 2006 Intro to ASP.NET
  21. 21. References Cont’d <ul><li>ASP.NET Cookbook - Michael Kittel, Geoffrey LeBlond </li></ul><ul><li>C# .NET Web Developer’s Guide – Adrian Turtschi, Jason Werry … </li></ul><ul><li>C# Developer’s Guide to ASP.NET, XML and ADO.NET – Jeffrey McManus, Chris Kinsman </li></ul><ul><li>Essential ASP.NET with Examples in C# - Fritz Onion </li></ul><ul><li>ASP.NET: Tips, Tutorials and Code – Scott Mitchell, Bill Anders… </li></ul>11 Oct 2006 Intro to ASP.NET
  22. 22. Thank you! 11 Oct 2006 Intro to ASP.NET
  23. 23. Questions? 11 Oct 2006 Intro to ASP.NET

×