Your SlideShare is downloading. ×
0
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Web engineering 2(lect 2)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Web engineering 2(lect 2)

551

Published on

Download it free...

Download it free...

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
551
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Web Engineering-II By; Roohul Amin Mashwani
  • 2. Introduction to ASP.NET 3.5
    • HTML Forms to Nowhere
    • Try This: HTML Data Entry with No Exit
      • Your Browser Is a Thin Client
      • A Protocol Without a Country: Stateless HTTP
    • ASP.NET 3.5 as an Alternative to CGI
    • From Client Side to Server Side
    • .NET Organization
      • Development Contexts
  • 3. Cont…
      • Running ASP.NET Files on Your Computer or LAN
      • ASP.NET in the Real World
      • Language Partners with ASP.NET
  • 4. Introduction to ASP.NET 3.5
    • In getting started with ASP.NET, you’re entering the world of server-side programming.
    • If you’re familiar with languages like PHP you already have some idea of what can be done with server-side processing.
    • You will find that ASP.NET has a lot in common with HTML.
  • 5. HTML Forms to Nowhere
    • In many respects the HTML tags available to create data input are a confusing and frustrating exercise in futility.
    • Users can enter information for everything from responses to a questionnaire to an order for a product.
    • Using a handy submit button, also available in HTML, you can then send the information to absolutely nowhere.
  • 6. HTML Data Entry with No Exit
    • Open your favorite text editor, Notepad will suffice, and paste the following HTML code.
    • Save the document as nowhere.html .
    • Next, open the HTML file in your browser.
    • The following HTML code will set up a perfectly clear HTML form that sends information into the ether:
  • 7. <html> <head> <title>HTML to Nowhere</title> </head> <body> <form> Please enter your name:<br/> <input type=&quot;text&quot; name=&quot;username&quot;/> <p/> Press the button to receive all of your hopes and dreams:<br/> <input type=&quot;submit&quot; value=&quot;Dream Button&quot; /> </form> </body> </html>
  • 8. Cont…
    • When you test the code after you enter your name and click the Dream Button your output will look just like;
  • 9. Output HTML data entry and submit form
  • 10. Cont…
    • Without some kind of mechanism to capture and store the information or pass it on to somewhere else, HTML can’t do.
    • What ASP.NET 3.5 offers is a way to store, retrieve, and process the information.
  • 11. Your Browser Is a Thin Client
    • Your browser’s main job is requesting pages from the server and displaying what the server has processed.
    • Using HTTP as a transfer protocol, your browser parses (interprets) the HTML code it gets from the server but otherwise does little processing.
  • 12. Cont…
    • Because your HTTP client (browser) leaves most of the processing work to the server, it is considered a thin client.
    • There’s nothing wrong with a thin client, and it can process JavaScript, Flash, etc.
    • With plug-ins, which virtually all browsers have built in.
  • 13. A Protocol Without a Country: Stateless HTTP
    • HTTP client browser is stateless.
    • As soon as a web page reaches your computer, the connection between your browser and the server is broken.
    • The browser does not remember the last page—it does not hold state.
    • As next page arrives, it does not remember the last page.
  • 14. Cont…
    • The ASP.NET environment lets you move from a stateless HTTP environment to a state-preserved one.
  • 15. ASP.NET 3.5 as an Alternative to CGI
    • Microsoft’s alternative to a Common Gateway Interface (CGI) is ASP.NET, now in version 3.5.
    • As a unified web platform, ASP.NET provides what you need to develop applications that hold state and use the information that you put into the HTML form.
  • 16. Cont…
    • Usually, when we think of saving state, we imagine writing the data to a storage device like a hard drive. Using a word processor, every time you save your file, you save its state.
    • Using ASP.NET, you can do the same thing with information from anyone who uses your web application.
  • 17. Cont…
    • Microsoft’s web server, Internet Information Services (IIS), uses the Internet Server API (ISAPI)
    • ASP.NET is as a request processing engine that takes incoming requests and sends them to a point where you can attach your C# script to process the request.
  • 18. Cont…
    • Both C# and Visual Basic.NET (VB.NET) are languages for creating managed code that is efficiently run in the .NET environment.
    • Microsoft .NET framework, means an application is executed by a virtual machine rather than by your own processor.
  • 19. From Client Side to Server Side Browser ASPX file Server- Server executes code; results converted to HTML and returned to client Data reference to ASPX file Returns HTML Client Web Server Server-side script runat=&quot;server&quot;
  • 20. Cont…
    • The example we’ll look at is saved in an ASP.NET file named Dreamer.aspx.
    • In the Dreamer.aspx file, the <form> container includes an input text window just like the HTML file-to-nowhere file, with only a slightly different format:
      • Default.aspx-------save
      • Dreamer.aspx.cs-------save as
  • 21. <%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;Dreamer.aspx.cs&quot; Inherits=&quot;_Dreamer&quot; %> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head id=&quot;Head1&quot; runat=&quot;server&quot;> <title>Server Side Dreamer</title> </head> <body> <form id=&quot;form1&quot; runat=&quot;server&quot;> <div> Please enter your name:<br /> <asp:TextBox ID=&quot;DreamBox&quot; runat=&quot;server&quot;> </asp:TextBox> <p /> Press the button to receive all of your hopes and dreams:<br /> <asp:Button ID=&quot;Dreamer“ runat=&quot;server“ Text=&quot;Dream Button&quot;OnClick=&quot;DoDream&quot; /> <p /> <asp:Label ID=&quot;Dreams&quot; runat=&quot;server&quot; Text=&quot;Dreams Here&quot;></asp:Label> </div> </form> </body> </html> Example of A Dynamic Website
  • 22. using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class _Dreamer : System.Web.UI.Page { protected void DoDream(object sender, EventArgs e) { Dreams.Text = DreamBox.Text + &quot;'s dreams are big ones!&quot;; } } Dreamer.aspx.cs
  • 23. Output
  • 24. .NET Organization
    • .NET is as a big control system with two key elements.
      • .NET framework class library.
      • .NET common language runtime.
  • 25. Cont…
      • .NET framework class library.
      • This library has thousands of classes organized into namespaces.
      • This library is a repository of reusable types for object-oriented development.
      • For example, System.Web.UI Namespace allows you to create several different ASP.NET server controls and user interfaces.
      • Each namespace contains a collection of classes.
  • 26. Cont…
      • The following represent a few of the classes in this namespace:
      • ● Control
      • ● Data Binder
      • ● PageParser
      • ● UserControl
      • To use the classes as well as other structures such as interfaces, you need to include the namespace in your program.
  • 27. Cont…
      • .NET common language runtime.
      • The runtime is a management agent for code as it executes.
  • 28. Online Help for IIS
    • Click Help or Online Help from within IIS Manager to view the product documentation.
    • View the IIS Operations Guide online.
    • Visit the official Microsoft IIS website to interact with the community and learn about IIS features.
  • 29. Thank You All!

×