15th june

14
8/29/22 1 WEBSITE DEVELOPMENT & INTRODUCTION TO ASP.net 15 th June 2010

Transcript of 15th june

Page 1: 15th june

6/14/2010 1

WEBSITE DEVELOPMENT& INTRODUCTION TO ASP.net

15th June 2010

Page 2: 15th june

6/14/2010 2

What is a Website ?

Page 3: 15th june

6/14/2010 3

Behind the scenes

• In Static website

• In Dynamic Website

Page 4: 15th june

6/14/2010 4

ASP.net• ASP.NET is a technology for building powerful,

dynamic Web applications and is part of the .NET Framework.

• ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding.

Page 5: 15th june

6/14/2010 5

Different Type of Projectsin VS 2010

• Websites• Web Applications• Web Services• Ajax Server Controls

Page 6: 15th june

6/14/2010 6

ASP.NET API Reference• System.Web– HttpRequest class– HttpResponse class– HttpServerUtility class– cookie manipulation– file transfer– exception information– output cache control.

Page 7: 15th june

6/14/2010 7

• System.Web.ApplicationServices– Provides classes that provide access to ASP.NET

forms authentication, roles, and profiles application services as Windows Communication Foundation (WCF) services.

• System.Runtime.Caching– Contains types that let you implement caching

in .NET Framework applications• System.Web.Configuration– Contains classes that are used to programmatically

manage ASP.NET configuration.

Page 8: 15th june

6/14/2010 8

• System.Web.Handlers– Contains HTTP handler classes that process HTTP

requests to a Web server. (An ASP.NET Web Forms page -- .aspx file -- is a special form of an HTTP handler.)

• System.Web.Routing– Provides classes that are used with URL routing, which

enables you to use URLs that do not map to a physical file.

• System.Web.Security– Contains classes that are used to implement ASP.NET

security in Web server applications.

Page 9: 15th june

6/14/2010 9

Website which is Compiled

• ASP.NET Compiler– All ASP.NET code is compiled, which enables

strong typing, performance optimizations, and early binding, among other benefits.

– Once the code has been compiled, the common language runtime further compiles ASP.NET code to native code, providing improved performance.

Page 10: 15th june

6/14/2010 10

HTMLOUTERMOST SHELL OF WEBSITE

Page 11: 15th june

6/14/2010 11

ASP.net Application Lifecycle

1. User requests an application resource from the Web server.

2. ASP.NET receives the first request for the application,a class named ApplicationManager creates an application domain.

3. ASP.NET core objects are created for each request.a) HttpContext, HttpRequest, and HttpResponse

Page 12: 15th june

6/14/2010 12

4. An HttpApplication object is assigned to the request, if the application has a Global.asax file, ASP.NET instead creates an instance of the Global.asax class that is derived from the HttpApplication class

5. The request is processed by the HttpApplication pipeline.

Page 13: 15th june

6/14/2010 13

First ASP.net Application

• <%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">

void Page_Load() { lblServerTime.Text = DateTime.Now.ToString(); }

</script><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>First Page</title></head>

Page 14: 15th june

6/14/2010 14

<body> <form id="form1" runat="server"> <div>

The current date and time is:

<asp:Label id="lblServerTime" Runat="server" />

</div> </form></body></html>