SlideShare a Scribd company logo
ASP.NET Part – I & II
Md. Mahedee Hasan
Software Architect
Leadsoft Bangladesh Limited
Linkedin: http://www.linkedin.com/in/mahedee
Blog: http://mahedee.net/
http://mahedee.blogspot.com/
1
Contents
Part - I
• Introduction to .NET Framework
• Visual Studio.NET IDE
• Web Architecture in ASP.net
• Software Architecture Basics
• ASP.net Control
• HTML Control
• ASP.net Provider model
• ASP.net Membership Provider model
• Master Page/Content Page
• ASP.net Themes
MAHEDEE.NET 2
Contents…
Part - II
• ASP.NET Compilation
• Website configuration
• State Management
• Caching
• Global Application Class (Global.asax)
• Culture (Localization and globalization)
• ASP.net Grid view
• Introduction to IIS
• ASP.net Page Lifecycle
• ASP.net website deployment in IIS
MAHEDEE.NET 3
Part - I
MAHEDEE.NET 4
Introduction to .NET Framework
• What is Microsoft .NET?
– Another Programming Language?
– No, then what it is?
– A framework that supports
• Programming Languages:
– e.g. C#, Visual Basic, C++, J# e.t.c
• Data, Markup Laguages:
– e.g. HTML, XML, CS
– A Software Platform.
– Language neutral.
– In general
• Framework is a basic or essential supporting structure of a system, concept or text.
MAHEDEE.NET 5
Introduction to .NET Framework…
• .NET framework is for developing web-based and windows-
based applications within the Microsoft environment.
• ASP.NET is the part of Microsoft .NET framework.
• Framework Class Library was designed to make it easier to
perform the most common programming tasks.
• Example: File class, Graphics class, Random class, SmtpClient class e.t.c
MAHEDEE.NET 6
Introduction to .NET Framework …
Narrow view of .NET Application
MAHEDEE.NET 7
Operating System + Hardware
.NET Framework
.NET Application
Introduction to .NET Framework …
.NET Technical Architecture
MAHEDEE.NET 8
Base Class Library
Common Language Specification
Common Language Runtime
ADO.NET: Data and XML
VB VC++ VC#
VisualStudio.NET
ASP.NET: Web Services
and Web Forms
JScript …
Windows
Forms
Introduction to .NET Framework …
Compilation in .NET
MAHEDEE.NET 9
Code in VB.NET Code in C#
Code in another
.NET Language
VB.NET compiler C# compiler
Appropriate
Compiler
IL(Intermediate
Language) code
CLR just-in-time
execution
Introduction to .NET Framework …
CLR Execution Model
MAHEDEE.NET 10
VBSource
code
Compiler
C++C#
CompilerCompiler
Assembly
IL Code
Assembly
IL Code
Assembly
IL Code
Operating System Services
Common Language Runtime
JIT Compiler
Native Code
Managed
code
Unmanaged
Component
Introduction to .NET Framework …
• Inspection : Compilation in .NET
– The source code get compiled by its own Compiler. As C# gets compiled
by the c# compiler.
– After the compilation the Intermediate Language Code is generated.
Which is also known as MSIL [Microsoft Intermediate Language]. This
code is understandable by the CLR.
– No matter in which language the code is written if the language is .net
supported then CLR will start processing the Intermediate Language
Code.
– JIT is a part of CLR which executes the assembly. Just in Time compiles
the code to generate the machine Native Code, which will be processed
by the OS.
MAHEDEE.NET 11
Visual Studio.NET IDE
• A powerful IDE
• Rich visual interface
• Support drag and drop
• Single IDE for all languages
• Server Explorer
– Event Viewer, Message Queues, Services
– SQL Databases, Data Connection, Etc.
• Integrated IE Browser
• Integrated D server
• Debugging tool
• Solution explorer
MAHEDEE.NET 12
Visual Studio.NET IDE…
• HTML/XML Editors
• Dynamic Help
• Common Forms Editor
– VB.NET, C++, and C#
• Deployment facility
• Beauty of .NET
– Less line of code required
– Require less time to develop
– Lower deployment costs
MAHEDEE.NET 13
Visual Studio.NET IDE…
Visual Studio .NET Environment
MAHEDEE.NET 14
Visual Studio.NET IDE...
Create Project
MAHEDEE.NET 15
Visual Studio.NET IDE...
Environment : After creating project
MAHEDEE.NET 16
ASP.net
• Introduction
– ASP - Active Server Pages
– Introduced in 1998 as Microsoft's first server side scripting engine.
– ASP.NET is a new ASP generation.
– It is not compatible with Classic ASP, but may include Classic ASP.
– ASP.NET pages are compiled, which makes them faster than Classic ASP.
– ASP.NET pages have the extension .aspx, and are normally written in VB
(Visual Basic) or C# (C sharp).
MAHEDEE.NET 17
ASP.net …
•ASP.NET, the platform services that allow to program Web
Applications and Web Services in any .NET language
•ASP.NET Uses .NET languages to generate HTML pages. HTML page
is targeted to the capabilities of the requesting Browser
•ASP.NET “Program” is compiled into a .NET class and cached the
first time it is called. All subsequent calls use the cached version.
MAHEDEE.NET 18
ASP.net …
• Logical Evolution of ASP
• Supports multiple languages
• Improved performance
• Control-based, event-driven execution model
• More productive
• Cleanly encapsulated functionality
MAHEDEE.NET 19
ASP.net …
• ASP.net Web form
– Allows clean cut code
– Code-behind Web Forms
– Easier and rich tool
– Code within is compiled then executed
– Improved handling of state information
– Support for ASP.NET server controls
– Data validation
– Data bound grids
MAHEDEE.NET 20
Web Architecture in ASP.net
MAHEDEE.NET 21
Web Architecture in ASP.net …
• The web application gets hosted in the server. The web client accepts the
request and transmits it to the IIS using the HTTP Protocol.
• HTTP is a transfer protocol for hyper text which is responsible for the
transmission of request and reply. It uses actions like Get/Put and different
Status Codes while transmission. It carries the request to the target server
and also traverse back with the reply. Depending on the action and status
code the client and server communicates.
• In the server side IIS accepts the request and process the request. IIS checks
for the resource and if it is a .net resource then IIS asks the .net framework to
process the request.
• Once the resource is ready then it is transferred to IIS again and using the
HTTP the reply is sent to the client as it uses the HTTP channel so the reply
has the content in hyper text.
MAHEDEE.NET 22
Software Architecture Basics
• Software Architecture is the structure of the solution that meets
– All of the technical and operational requirements
– Optimizing quality attributes
• Performance
• Security
– Increase manageability
MAHEDEE.NET 23
client,
users
architect developers
appearance,
behaviour
construction,
co-operation
architectural
design
visualises prescribes
requirements solutions
createsassess assess
Software Architecture Basics …
• Software architecture is
– A blue print of system and project
– The primary carrier of the system quality
– An artifact for early analysis to make sure that the design approach will
yield an acceptable system.
– In short, architecture is the conceptual glue that holds every phase of the
project together for all its many stakeholders.
– Manages a collection of discrete objects
– Implements a set of specific design elements
MAHEDEE.NET 24
Software Architecture Basics…
Layer vs. Tier
• Layer
– Logical structure of the application
– Typically layer is the logical organization of the code
– It cannot deploy as different process or different server
– Ex. Presentation, business and data layer
• Tier
– Physical structure of the application
– It is said that tier is the physical deployment of the layer
– It can deploy as different process or different server
– Ex. Presentation, business and data tier
MAHEDEE.NET 25
ASP.net Control
• AdRotator Displays a sequence of images
• Button Displays a push button
• Calendar Displays a calendar
• CalendarDay A day in a calendar control
• CheckBox Displays a check box
• DropDownList Creates a drop-down list
• HyperLink Creates a hyperlink
• Label Displays static content which is programmable
• LinkButton Creates a hyperlink button
• ListBox Creates a single- or multi-selection drop-down list
MAHEDEE.NET 26
ASP.net Control…
Panel Provides a container for other controls
PlaceHolder Reserves space for controls added by code
RadioButton Creates a radio button
RadioButtonList Creates a group of radio buttons
Table Creates a table
TableCell Creates a table cell
TableRow Creates a table row
TextBox Creates a text box
MAHEDEE.NET 27
ASP.net Control…
CompareValidator Compares the value of one input control to the value of
another input control or to a fixed value
CustomValidator Allows you to write a method to handle the validation of the
value entered
RangeValidator Checks that the user enters a value that falls between two values
RequiredFieldValidator Makes an input control a required field
ValidationSummary Displays a report of all validation errors occurred in a Web
page
RegularExpressionValidator Ensures that the value of an input control matches a
specified pattern
MAHEDEE.NET 28
HTML Control…
HtmlButton Controls a <button> HTML element
HtmlForm Controls a <form> HTML element
HtmlInputHidden Controls an <input type="hidden"> HTML element
HtmlTable Controls a <table> HTML element
HtmlTableCell Controls <td>and <th> HTML elements
HtmlTableRow Controls a <tr> HTML element
HtmlTextArea Controls a <textarea> HTML element
MAHEDEE.NET 29
ASP.net Provider Model
• A provider is a software module that provides a uniform
interface between a service and a data source.
• To make ASP.net state storage both flexible and extensible
MAHEDEE.NET 30
The membership provider model
ASP.net Provider Model…
• Membership
• System.Web.Security.ActiveDirectoryMembershipProvider
• System.Web.Security.SqlMembershipProvider
• Role management
• System.Web.Security.AuthorizationStoreRoleProvider
• System.Web.Security.SqlRoleProvider
• System.Web.Security.WindowsTokenRoleProvider
• Site map
• System.Web.XmlSiteMapProvider
• Profile
• System.Web.Profile.SqlProfileProvider
MAHEDEE.NET 31
ASP.net Provider Model…
• Session state
• System.Web.SessionState.InProcSessionStateStore
• System.Web.SessionState.OutOfProcSessionStateStore
• System.Web.SessionState.SqlSessionStateStore
• Web events
• System.Web.Management.EventLogWebEventProvider
• System.Web.Management.SimpleMailWebEventProvider
• System.Web.Management.TemplatedMailWebEventProvider
• System.Web.Management.SqlWebEventProvider
• System.Web.Management.TraceWebEventProvider
• System.Web.Management.WmiWebEventProvider
MAHEDEE.NET 32
ASP.net Provider Model…
• Web Parts personalization
– System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider
• Protected configuration
– System.Configuration.DPAPIProtectedConfigurationProvider
– System.Configuration.RSAProtectedConfigurationProvider
MAHEDEE.NET 33
Master Page/ Content Page
Master Page
• A Master page defines the site-wise layout and the regions
editable on a content page-by-content page basis.
• Firstly introduce in ASP.NET 2.0 on VS 2005. And in VS 2008
offers design-time support for nested master pages.
• Special @Master directive
<%@ Master Language="C#" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
MAHEDEE.NET 34
Master Page/ Content Page
Content Page
• With the master page created, we are ready to start creating
ASP.NET pages that are bound to the master page. Such pages
are referred to as content pages.
<asp:contentplaceholder id="Main" runat="server" />
MAHEDEE.NET 35
Master Page/ Content Page
MAHEDEE.NET 36
Fig – Sample Master Page
ASP.net Themes
• Themes is a cool and easy way to create a consistent look and
feel across a page or an entire website
• By using themes, you can easily customize your server controls
with predefined looks
• The themes feature allows to dictate the appearance of controls
in your application using template files with a .skin extension,
and with style sheets
• A .skin file can contain one or more control skins for one or more
control types.
MAHEDEE.NET 37
ASP.net Themes …
MAHEDEE.NET 38
ASP.net Themes …
MAHEDEE.NET 39
• The most important types of files in a Theme folder are the
following:
– Skin files
– Cascading Style Sheet file
ASP.net Themes …
MAHEDEE.NET 40
• Adding Skins to theme (Default)
– You must always include a Runat attribute, but you can never include
the ID attribute when declaring a control in a Skin
<asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
Theme="Textbox" %>
ASP.net Themes …
MAHEDEE.NET 41
• Named skin
– When you create a Named Skin, you can decide when you want to apply
the Skin.
<asp:TextBox SkinID=“DashedTextBox” BorderStyle=“Dashed” BorderWidth=“5px”
Runat=“Server” />
<%@ Page Language=”C#” Theme=”Textbox” %>
<asp:TextBox id=“txtFirstName” SkinID=“DashedTextBox” Runat=“server” />
ASP.net Themes …
MAHEDEE.NET 42
• Themes Versus StyleSheetThemes
– You might want to display every Label in your web site with an orange back-
Ground color except for one Label. In that case, it would be nice if there was a way
to override the Skin property.
<asp:Label BackColor=”Orange” Runat=”Server” />
<%@ Page Language=”C#” StyleSheetTheme=”Labelskin” %>
<asp:Label id=”Label1” Text=”What color background do I have?” BackColor=”red”
Runat=”server” /
ASP.net Themes …
MAHEDEE.NET 43
• Disabling Themes
<asp:Calendar id=”Calendar2” EnableTheming=”false” Runat=”server” />
• Adding Cascading Style Sheets to Themes
h1 {
color: red;
background-color:gray;
}
<h1>.:Cascading Style Sheet as a theme:.</h1>
Part - II
MAHEDEE.NET 44
ASP.net Compilation
• ASP.net first compiles the code into one or more assemblies in
order to service request by the user.
• ASP.net code can be write in many different languages – C#,
Visual basic, J#, others.
• Code is compiled to MSIL
– MSIL is language and CPU independent
• At run time, MSIL runs in the context of the .NET Framework,
which translates MSIL into CPU-specific instructions for the
processor
MAHEDEE.NET 45
ASP.net Compilation…
• Benefits of compiling application code
– Performance
• Compiled code is much faster than scripting code
– Security
• Compiled code is difficult to reverse engineering
– Stability
• Code is checked at compile time for syntax errors, type safety, and other problems
– Interoperability
• MSIL code is supported by .NET, you can use assemblies that were originally written in
other languages in your code
MAHEDEE.NET 46
ASP.net Compilation…
• ASP.net compilation architecture features
– Multiple language supports
– Automatic compilation
• ASP.NET automatically compiles your application code and any dependent resources
the first time a user requests a resource from the Web site
– Flexible deployment
• ASP.NET compiler tool (ASPNET_Compiler.exe) provides the following pre compilation
options:
– In place compilation
– Non-updateable full pre compilation
– Updateable pre compilation
– Extensible build system
• Extend and customize the ASP.NET build system to compile custom resources by
creating classes that inherit from the BuildProvider class
MAHEDEE.NET 47
ASP.net Compilation…
• Dynamic compilation
– ASP.NET dynamic compilation enables you to modify your source code
without having to explicitly compile your code before you deploy your
Web application
– Compiling on first request
– Recompiling on change
– Compilation dependencies
– Compilation output
• Compilation folder output
– %SystemRoot%Microsoft.NETFrameworkversionNumberTemporary ASP.NET Files
• Compilation Folder Required Permissions
• Compilation Folder Configurability
– %FrameworkInstallLocation%Temporary ASP.NET Files
– Support multiple languages
MAHEDEE.NET 48
ASP.net Compilation…
• Disadvantages of dynamic compilation
– Slower
• Pages and code files must be compiled the first time they are requested
– Dynamic compilation does not offer a means to identify compile-time
bugs
– Does not provide the ability to create a compiled version
MAHEDEE.NET 49
Website configuration
• ASP.net uses a hierarchical system of configuration
• At the top of the hierarchy is Machine.config file
– C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGMachine.config
MAHEDEE.NET 50
Website configuration…
• The CONFIG folder includes the following six files:
– Machine.config—Contains the actual configuration settings.
– Machine.config.default—Contains the default values for all configuration
settings.
– Machine.config.comments—Contains comments on each configuration
setting.
– Web.config—Contains the actual configuration settings.
– Web.config.default—Contains the default values for all configuration
settings.
– Web.config.comments—Contains comments on each configuration
setting
MAHEDEE.NET 51
Website configuration…
Web.config file and it’s elements
• ASP.NET Web.config file provides you a flexible way to handle all
your requirements at the application level
• Web.config files are stored in XML format which makes us easier
to work with
• IIS is configured in such a way that it prevents the Web.config
file access from the browser.
• The changes in Web.config don’t require the reboot of the web
server.
MAHEDEE.NET 52
Website configuration…
Hierarchy of the Web.config file
MAHEDEE.NET 53
Website configuration…
Elements of Web.config file
MAHEDEE.NET 54
Website configuration…
Elements of Web.config file
MAHEDEE.NET 55
Session State Settings
App Settings
Connection string settings
Website configuration…
Programmatically accessing web.config file
• Reading appSettings values
string key = ConfigurationManager.AppSettings["AppKey"];
• Reading connectionstring values
string cnn = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
• Update the configuration section values
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
//Get the required section of the web.config file by using configuration object.
CompilationSection compilation =
(CompilationSection)config.GetSection("system.web/compilation");
//Update the new values.
compilation.Debug = true;
config.Save();
MAHEDEE.NET 56
State Management
• The State or Cache Management is nothing but the way to
storing the data in Client-Side and in Server-Side using small
memory.
• There are two ways to manage state:
– Client Side State management
• Stores information on the client's computer
– Server side state management
• Store information on application server
• Higher security than client-side options
• Used more web server resources
MAHEDEE.NET 57
State Management…
• Client side state management
– View State
– Hidden fields
– Cookies
– Query Strings
– Control State
• Server side state management
– Application state
– Session state
MAHEDEE.NET 58
State Management…
View state
– It stores data in the generated HTML using hidden field not on the server.
– View State provides page level state management
– As long as the user is on the current page, state is available and the user
redirects to the next page and the current page state is lost
– View State can store any type of data because it is object type but it is
preferable not to store a complex type of data due to the need for
serialization and deserialization on each post back
MAHEDEE.NET 59
State Management…
View state…
MAHEDEE.NET 60
State Management…
Hidden Fields
• Hidden fields are used to store data at the page level
• Hidden fields are not rendered by the browser.
• It's just like a standard control for which you can set its
properties
• Advantages:
– Simple to implement for a page specific data
– Can store small amount of data so they take less size.
• Disadvantages:
– Inappropriate for sensitive data
– Hidden field values can be intercepted(clearly visible) when passed over a
network
MAHEDEE.NET 61
State Management…
Hidden Fields…
<asp:HiddenField ID="HiddenField1" runat="server" />
protected void Page_Load(object sender, EventArgs e)
{
if (HiddenField1.Value != null)
{
int val= Convert.ToInt32(HiddenField1.Value) + 1;
HiddenField1.Value = val.ToString();
Label1.Text = val.ToString();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
}
MAHEDEE.NET 62
State Management…
Cookies
• A cookie is a small piece of text stored on user's computer
• Every time a user visits a website, cookies are retrieved from
user machine and help identify the user
• Advantages:
– Simplicity
• Disadvantages:
– Cookies can be disabled on user browsers
– Cookies are transmitted for each HTTP request/response causing
overhead on bandwidth
– Inappropriate for sensitive data
MAHEDEE.NET 63
State Management…
Cookies..
• Persistence Cookie: Cookies which you can set an expiry date
time are called persistence cookies. Persistence cookies are
permanently stored till the time you set.
Response.Cookies["nameWithPCookies"].Value = "This is A Persistance Cookie";
Response.Cookies["nameWithPCookies"].Expires = DateTime.Now.AddSeconds(10);
And the second one is:
HttpCookie aCookieValPer = new HttpCookie("Persistance");
aCookieValPer.Value = "This is A Persistance Cookie";
aCookieValPer.Expires = DateTime.Now.AddSeconds(10);
Response.Cookies.Add(aCookieValPer);
MAHEDEE.NET 64
State Management…
Cookies…
• Non-Persistence Cookie: Non persistence cookies are not
permanently stored on the user client hard disk folder. It
maintains user information as long as the user accesses the
same browser. When user closes the browser the cookie will be
discarded.
Response.Cookies["nameWithNPCookies"].Value = "This is A Non Persistance Cookie";
And the second way is:
HttpCookie aCookieValNonPer = new HttpCookie("NonPersistance");
aCookieValNonPer.Value = "This is A Non Persistance Cookie”;
Response.Cookies.Add(aCookieValNonPer);
How to read a cookie:
if (Request.Cookies["NonPersistance"] != null)
Label2.Text = Request.Cookies["NonPersistance"].Value;
MAHEDEE.NET 65
State Management…
QueryString
• Query strings are usually used to send information from one
page to another page.
• They are passed along with URL in clear text.
• Advantages:
– Simple to Implement
• Disadvantages:
– Human Readable
– Client browser limit on URL length
– Cross paging functionality makes it redundant
– Easily modified by end user
http://www.productdetails.aspx?productid=4
string v = Request.QueryString["productid"];
MAHEDEE.NET 66
State Management…
Application State
• Application object is used to store data which is visible across
entire application
• Shared across multiple user sessions.
• Data which needs to be persisted for entire life of application
should be stored in application object.
Application.Lock();
Application["mydata"]="mydata";
Application.UnLock();
MAHEDEE.NET 67
State Management…
Session Object
• Session object is used to store state specific information per
client basis.
• It is specific to particular user.
• Session data persists for the duration of user session you can
store session's data on web server in different ways.
Session[“userName"] = “mahedee”;//Set Value to The Session
Label2.Text = Session[“userName"].ToString(); //Get Value from the Session
MAHEDEE.NET 68
State Management…
Session State Mode
• There are four session storage mechanisms provided by ASP.NET
– InProc mode
– StateServer mode
– SQLServer mode
– Custom mode
• InProc Mode
– InProc mode is the default mode provided by ASP.NET
– In this mode, session values are stored in the web server's memory (in
IIS).
<sessionstate mode="InProc" cookieless="false" timeout="10“ />
MAHEDEE.NET 69
State Management…
Session State Mode…
• StateServer mode
– This mode could store session in the web server but out of the
application pool.
– Usually if this mode is used there will be a separate server for storing
sessions, i.e., stateServer.
– The benefit is that when IIS restarts, the session is available.
– It stores session in a separate Windows service.
– For State server session mode, we have to configure it explicitly in the
web config file and start the aspnet_state service.
<sessionstate mode="stateserver" cookieless="false"
timeout="10" stateConnectionString="tcpip=127.0.0.1:42424"/>
MAHEDEE.NET 70
State Management…
Session State Mode…
• SQLServer mode
– Session is stored in a SQL Server database.
– This kind of session mode is also separate from IIS, i.e., session is
available even after restarting the IIS server.
– This mode is highly secure and reliable but also has a disadvantage that
there is overhead from serialization and deserialization of session data.
– This mode should be used when reliability is more important than
performance.
<sessionstate mode="sqlserver" cookieless="false" timeout="10"
stateConnectionString="tcpip=127.0.0.1:4 2424"
sqlConnectionString="Data Source=.SqlDataSource;User ID=userid;Password=password"/>
MAHEDEE.NET 71
State Management…
Session State Mode…
• Custom mode
o Generally we should prefer InProc state server mode or SQL Server mode
o If you need to store session data using other than these techniques then
ASP.NET provides a custom session mode.
o This way we have to maintain everything customized even generating
session ID, data store, and also security.
MAHEDEE.NET 72
Caching
• Caching is a technique of storing data in memory which takes
time to create
• There are two main types of caching:
– Output caching
• Cache the final render HTML of the page.
• When the same page is requested again, the cached page is served
• ASP.NET does not start the page life cycle and does not execute the code
<%@ OutputCache Duration=”60” VaryByParam=”None”%>
– Data caching
• Flexible way to cache a DataSet object or any collection object
date1 = DateTime.Now;
Cache.Insert("Date1", date1, null, DateTime.Now.AddSeconds(20), TimeSpan.Zero);
Or DataSet ds = new DataSet();
ds = (DataSet) Cache["MyDataSet"];
MAHEDEE.NET 73
Caching…
• Valid parameter for output caching
– VaryByParam
• <%@ OutputCache Duration="60" VaryByParam="CategoryID" %>
– <%@ OutputCache Duration="60" VaryByParam="id;langid" %>
• <%@ OutputCache Duration="60" VaryByParam="*" %>
– VaryByControl
• <%@ OutputCache Duration="20" VaryByControl="MyControlId" %>
– VaryByCustom
• <%@ OutputCache Duration="60" VaryByCustom="browser" %>
MAHEDEE.NET 74
Caching…
• Cache Profile
– Provides a facility to define cache settings in the web.config
<system.web>
<caching>
<outputCacheSettings >
<outputCacheProfiles>
<add name ="ProductItemCacheProfile" duration ="60"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
<%@ OutputCache CacheProfile ="ProductItemCacheProfile" VaryByParam="None" %>
MAHEDEE.NET 75
Global.asax File
• The Global.asax, also known as the ASP.NET application file
• It is used to serve application-level and session-level events.
• The Global.asax file resides in the root directory of an ASP.NET-
based application.
• At run time, Global.asax is parsed and compiled into a
dynamically generated .NET Framework class derived from the
HttpApplication base class.
• The Global.asax file itself is configured so that any direct URL
request for it is automatically rejected
• External users cannot download or view the code written within
it.
MAHEDEE.NET 76
Global.asax File…
MAHEDEE.NET 77
Culture (Localization and globalization)
• Localization is the process of adapting a software application for
a specific locale.
• Globalization is the process of identifying the localizable
resources of the application.
• To support Localization and Globalization, we use
– System.Globalization - can define culture specific information
– System.Resources - ResourceManager Class
– System.Threading namespaces - supports for multithreaded programming
MAHEDEE.NET 78
Culture (Localization and globalization)…
• Has two culture values
– Culture
– UICulture
• Culture value is used for date and number formatting
• UICulture values are used to determine culture specific
resources
• Can set culture and UICulture values in the application as
follows.
Using <globalization> element of Web.Config.
Using @Page directive in the Page.
e.g.
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-GB");
Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-GB");
MAHEDEE.NET 79
Culture (Localization and globalization)…
• Two main properties of Page class have an effect on localization:
– UICulture
• Used to specify which resource files are loaded for the page
– Culture
• Determines how strings such as dates, numerals, and currency amounts are formatted
• Setting culture manually
<%@ Page Language="C#" Culture="bn-BD" UICulture="bn-BD" AutoEventWireup="true"
CodeFile="ManualCulture.aspx.cs" Inherits="ManualCulture" %>
this.lblMsg.Text = DateTime.Today.ToString();
• Setting the Culture in the Web Configuration File
<globalization culture="en-US" uiCulture="en-US"/>
MAHEDEE.NET 80
Culture (Localization and globalization)…
• Creating local resource
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="LocalizablePage.aspx.cs" UICulture="auto" Inherits="LocalizablePage" %>
<asp:Button id=”btnSubmit” meta:resourceKey=”btnSubmit” Text=”Click Me!” ToolTip=”Click to show
message” OnClick=”btnSubmit_Click” Runat=”server” />
<asp:Label id=”lblMessage” meta:resourceKey=”lblMessage” Text=”Thank You!” Visible=”false”
Runat=”server” /
MAHEDEE.NET 81
ASP.net Grid view
• Powerful server side control
• Excellent data binding architecture
• Including Sorting, paging, deleting option
MAHEDEE.NET 82
IIS
• IIS stands for Internet Information Server
• IIS is web server application and set of feature extension
modules
• A Web server is primarily a server application that can be
contacted using a bunch of Internet protocols, such as
– HTTP
– File Transfer Protocol (FTP)
– Simple Mail Transfer Protocol (SMTP)
• Developed by Microsoft
MAHEDEE.NET 83
IIS …
• HTTP Request
– When the client request for the resource using HTTP Pipeline.
– Example
GET /index.html HTTP/1.1
Host: www.example.com
• HTTP Response
– The response from the server against a request
– Example
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Content-Type: text/html; charset=UTF-8
MAHEDEE.NET 84
IIS …
MAHEDEE.NET 85
Fig – Processing server page
Processing server page
IIS …
• Processing server page
– Request is sent by the web browser through the HTTP Protocol.
– The request hits the IIS where the request has the resource location.
– HTTP carries the request in a hyper text format. When IIS gets the
request then it checks in the isapi extension to map the worker
process.
– Inetinfo.exe at the IIS is responsible for the process. aspnet_isapi.dll
is mapped for the asp. net application. Then according to the
mapping table if it is an aspx page then aspnet_wp.exe handles the
request from asp. net.
– It checks for the resource and after finding the framework executes
the assembly and generates the html page for the client.
– IIS then again takes the response from .NET and passes it via
HTTP protocol.
MAHEDEE.NET 86
IIS …
• Application pool
– Concept of application pool is introduced in IIS 6.0
– Application pools are used to separate sets of IIS worker processes
– Application pools used to isolate our web application for better security,
reliability, and availability and performance
– Keep running without impacting each other
– Isolation of Different Web Application
– Individual worker process for different web application
– More reliably web application
– Better Performance
MAHEDEE.NET 87
ASP.net Page Lifecycle
MAHEDEE.NET 88
Fig – ASP.net page lifecycle
ASP.net Page Lifecycle …
MAHEDEE.NET 89
Fig – Events in the page lifecycle
ASP.net Page Lifecycle …
MAHEDEE.NET 90
ASP.net Website deployment in IIS
MAHEDEE.NET 91
ASP.net Website deployment in IIS …
MAHEDEE.NET 92
Convert to Web Application
ASP.net Website deployment in IIS …
MAHEDEE.NET 93
Create application pool
ASP.net Website deployment in IIS …
MAHEDEE.NET 94
Assign application pool to the application
ASP.net Website deployment in IIS …
MAHEDEE.NET 95
Assign application pool to the application …
96MAHEDEE.NET

More Related Content

What's hot (20)

PPT
Introduction to .NET Framework
Raghuveer Guthikonda
 
PDF
Asp.net state management
priya Nithya
 
PPTX
ASP.NET Page Life Cycle
Abhishek Sur
 
PPTX
Threads in JAVA
Haldia Institute of Technology
 
PPTX
Angularjs PPT
Amit Baghel
 
PPTX
ASP.NET Presentation
dimuthu22
 
PPT
Introduction to c#
OpenSource Technologies Pvt. Ltd.
 
PPSX
Javascript variables and datatypes
Varun C M
 
PPT
C# basics
Dinesh kumar
 
PPT
Network programming in Java
Tushar B Kute
 
PPTX
Web forms in ASP.net
Madhuri Kavade
 
PPT
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
PPTX
ASP.NET - Life cycle of asp
priya Nithya
 
PPT
Graphical User Interface in JAVA
suraj pandey
 
PPTX
C# in depth
Arnon Axelrod
 
PPT
Threads And Synchronization in C#
Rizwan Ali
 
PPTX
C# 101: Intro to Programming with C#
Hawkman Academy
 
PPTX
Network programming in java - PPT
kamal kotecha
 
Introduction to .NET Framework
Raghuveer Guthikonda
 
Asp.net state management
priya Nithya
 
ASP.NET Page Life Cycle
Abhishek Sur
 
Angularjs PPT
Amit Baghel
 
ASP.NET Presentation
dimuthu22
 
Javascript variables and datatypes
Varun C M
 
C# basics
Dinesh kumar
 
Network programming in Java
Tushar B Kute
 
Web forms in ASP.net
Madhuri Kavade
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
ASP.NET - Life cycle of asp
priya Nithya
 
Graphical User Interface in JAVA
suraj pandey
 
C# in depth
Arnon Axelrod
 
Threads And Synchronization in C#
Rizwan Ali
 
C# 101: Intro to Programming with C#
Hawkman Academy
 
Network programming in java - PPT
kamal kotecha
 

Viewers also liked (16)

PPTX
The ASP.NET Web API for Beginners
Kevin Hazzard
 
PPTX
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
PPTX
ASP.NET Web API
habib_786
 
PPT
Data controls ppt
Iblesoft
 
PPT
Nnnnnn
nautami
 
PPT
Asp.net basic
Neelesh Shukla
 
PPTX
Ch 7 data binding
Madhuri Kavade
 
PPT
Asp.net
Dinesh kumar
 
PDF
C# ASP.NET WEB API APPLICATION DEVELOPMENT
Dr. Awase Khirni Syed
 
PPTX
data controls in asp.net
subakrish
 
PPT
Server Controls of ASP.Net
Hitesh Santani
 
PPT
ASP.NET 10 - Data Controls
Randy Connolly
 
PPT
Concepts of Asp.Net
vidyamittal
 
PPTX
Asp.NET Validation controls
Guddu gupta
 
PPTX
Introduction to asp.net
Melick Baranasooriya
 
PPT
ASP.NET Tutorial - Presentation 1
Kumar S
 
The ASP.NET Web API for Beginners
Kevin Hazzard
 
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
ASP.NET Web API
habib_786
 
Data controls ppt
Iblesoft
 
Nnnnnn
nautami
 
Asp.net basic
Neelesh Shukla
 
Ch 7 data binding
Madhuri Kavade
 
Asp.net
Dinesh kumar
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
Dr. Awase Khirni Syed
 
data controls in asp.net
subakrish
 
Server Controls of ASP.Net
Hitesh Santani
 
ASP.NET 10 - Data Controls
Randy Connolly
 
Concepts of Asp.Net
vidyamittal
 
Asp.NET Validation controls
Guddu gupta
 
Introduction to asp.net
Melick Baranasooriya
 
ASP.NET Tutorial - Presentation 1
Kumar S
 
Ad

Similar to ASP.NET Web form (20)

PPTX
Feature and Future of ASP.NET
Md. Mahedee Hasan
 
PPTX
Unit - 1: ASP.NET Basic
KALIDHASANR
 
PPT
.Net Framework Overview. Fundamentals of .Net Framework
pavankumar47666
 
PPS
Asp.net new
Ganesh Jaya
 
PPSX
Net development
Anurag Gupta
 
PPTX
Net development
Vivek Chaturvedi
 
PPTX
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 
PDF
Asp.net web application framework management system.pdf
Kamal Acharya
 
PPT
Synapse india fundamentals of dotnet development
Synapseindiappsdevelopment
 
PPTX
Asp.net
vijilakshmi51
 
PPTX
1-.NET Introduction.pptx
RKAggarwal6
 
PDF
Cetpa infotech is the best advanced .net training institute in Delhi NCR
ACCHITABAJPAI
 
PPT
Webhouse
Omprakash Gomaskar
 
PPTX
.NET Comprehensive guide to C# Covering advance topics and best practices.
ISEESTechnologiesLLP
 
PDF
Practical guide for building web applications with ASP .NET core.
ISEESTechnologiesLLP
 
PPT
Buildingwebapplicationswith.net
Kolagani Veera
 
PPTX
Web techh
SangeethaSasi1
 
PPTX
Web tech
SangeethaSasi1
 
PPTX
Web tech
SangeethaSasi1
 
Feature and Future of ASP.NET
Md. Mahedee Hasan
 
Unit - 1: ASP.NET Basic
KALIDHASANR
 
.Net Framework Overview. Fundamentals of .Net Framework
pavankumar47666
 
Asp.net new
Ganesh Jaya
 
Net development
Anurag Gupta
 
Net development
Vivek Chaturvedi
 
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 
Asp.net web application framework management system.pdf
Kamal Acharya
 
Synapse india fundamentals of dotnet development
Synapseindiappsdevelopment
 
Asp.net
vijilakshmi51
 
1-.NET Introduction.pptx
RKAggarwal6
 
Cetpa infotech is the best advanced .net training institute in Delhi NCR
ACCHITABAJPAI
 
.NET Comprehensive guide to C# Covering advance topics and best practices.
ISEESTechnologiesLLP
 
Practical guide for building web applications with ASP .NET core.
ISEESTechnologiesLLP
 
Buildingwebapplicationswith.net
Kolagani Veera
 
Web techh
SangeethaSasi1
 
Web tech
SangeethaSasi1
 
Web tech
SangeethaSasi1
 
Ad

More from Md. Mahedee Hasan (18)

PPTX
Azure Machine Learning
Md. Mahedee Hasan
 
PPTX
Chatbot development with Microsoft Bot Framework and LUIS
Md. Mahedee Hasan
 
PPTX
Chatbot development with Microsoft Bot Framework
Md. Mahedee Hasan
 
PPTX
ASP.NET MVC Zero to Hero
Md. Mahedee Hasan
 
PPTX
Introduction to Windows 10 IoT Core
Md. Mahedee Hasan
 
PPTX
Whats new in visual studio 2017
Md. Mahedee Hasan
 
PPTX
Increasing productivity using visual studio 2017
Md. Mahedee Hasan
 
PPSX
Exciting features in visual studio 2017
Md. Mahedee Hasan
 
PDF
Introduction to TFS 2013
Md. Mahedee Hasan
 
PDF
The world of enterprise solution development with asp.net and C#
Md. Mahedee Hasan
 
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
Md. Mahedee Hasan
 
PDF
Introduction to OMNeT++
Md. Mahedee Hasan
 
PPTX
Generic Repository Pattern with ASP.NET MVC and EF
Md. Mahedee Hasan
 
PPSX
C#.net applied OOP - Batch 3
Md. Mahedee Hasan
 
PDF
Object Oriented Programming
Md. Mahedee Hasan
 
PPSX
Oop principles
Md. Mahedee Hasan
 
PPSX
MS SQL Server
Md. Mahedee Hasan
 
PPSX
C# - Part 1
Md. Mahedee Hasan
 
Azure Machine Learning
Md. Mahedee Hasan
 
Chatbot development with Microsoft Bot Framework and LUIS
Md. Mahedee Hasan
 
Chatbot development with Microsoft Bot Framework
Md. Mahedee Hasan
 
ASP.NET MVC Zero to Hero
Md. Mahedee Hasan
 
Introduction to Windows 10 IoT Core
Md. Mahedee Hasan
 
Whats new in visual studio 2017
Md. Mahedee Hasan
 
Increasing productivity using visual studio 2017
Md. Mahedee Hasan
 
Exciting features in visual studio 2017
Md. Mahedee Hasan
 
Introduction to TFS 2013
Md. Mahedee Hasan
 
The world of enterprise solution development with asp.net and C#
Md. Mahedee Hasan
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Md. Mahedee Hasan
 
Introduction to OMNeT++
Md. Mahedee Hasan
 
Generic Repository Pattern with ASP.NET MVC and EF
Md. Mahedee Hasan
 
C#.net applied OOP - Batch 3
Md. Mahedee Hasan
 
Object Oriented Programming
Md. Mahedee Hasan
 
Oop principles
Md. Mahedee Hasan
 
MS SQL Server
Md. Mahedee Hasan
 
C# - Part 1
Md. Mahedee Hasan
 

Recently uploaded (20)

PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 

ASP.NET Web form

  • 1. ASP.NET Part – I & II Md. Mahedee Hasan Software Architect Leadsoft Bangladesh Limited Linkedin: http://www.linkedin.com/in/mahedee Blog: http://mahedee.net/ http://mahedee.blogspot.com/ 1
  • 2. Contents Part - I • Introduction to .NET Framework • Visual Studio.NET IDE • Web Architecture in ASP.net • Software Architecture Basics • ASP.net Control • HTML Control • ASP.net Provider model • ASP.net Membership Provider model • Master Page/Content Page • ASP.net Themes MAHEDEE.NET 2
  • 3. Contents… Part - II • ASP.NET Compilation • Website configuration • State Management • Caching • Global Application Class (Global.asax) • Culture (Localization and globalization) • ASP.net Grid view • Introduction to IIS • ASP.net Page Lifecycle • ASP.net website deployment in IIS MAHEDEE.NET 3
  • 5. Introduction to .NET Framework • What is Microsoft .NET? – Another Programming Language? – No, then what it is? – A framework that supports • Programming Languages: – e.g. C#, Visual Basic, C++, J# e.t.c • Data, Markup Laguages: – e.g. HTML, XML, CS – A Software Platform. – Language neutral. – In general • Framework is a basic or essential supporting structure of a system, concept or text. MAHEDEE.NET 5
  • 6. Introduction to .NET Framework… • .NET framework is for developing web-based and windows- based applications within the Microsoft environment. • ASP.NET is the part of Microsoft .NET framework. • Framework Class Library was designed to make it easier to perform the most common programming tasks. • Example: File class, Graphics class, Random class, SmtpClient class e.t.c MAHEDEE.NET 6
  • 7. Introduction to .NET Framework … Narrow view of .NET Application MAHEDEE.NET 7 Operating System + Hardware .NET Framework .NET Application
  • 8. Introduction to .NET Framework … .NET Technical Architecture MAHEDEE.NET 8 Base Class Library Common Language Specification Common Language Runtime ADO.NET: Data and XML VB VC++ VC# VisualStudio.NET ASP.NET: Web Services and Web Forms JScript … Windows Forms
  • 9. Introduction to .NET Framework … Compilation in .NET MAHEDEE.NET 9 Code in VB.NET Code in C# Code in another .NET Language VB.NET compiler C# compiler Appropriate Compiler IL(Intermediate Language) code CLR just-in-time execution
  • 10. Introduction to .NET Framework … CLR Execution Model MAHEDEE.NET 10 VBSource code Compiler C++C# CompilerCompiler Assembly IL Code Assembly IL Code Assembly IL Code Operating System Services Common Language Runtime JIT Compiler Native Code Managed code Unmanaged Component
  • 11. Introduction to .NET Framework … • Inspection : Compilation in .NET – The source code get compiled by its own Compiler. As C# gets compiled by the c# compiler. – After the compilation the Intermediate Language Code is generated. Which is also known as MSIL [Microsoft Intermediate Language]. This code is understandable by the CLR. – No matter in which language the code is written if the language is .net supported then CLR will start processing the Intermediate Language Code. – JIT is a part of CLR which executes the assembly. Just in Time compiles the code to generate the machine Native Code, which will be processed by the OS. MAHEDEE.NET 11
  • 12. Visual Studio.NET IDE • A powerful IDE • Rich visual interface • Support drag and drop • Single IDE for all languages • Server Explorer – Event Viewer, Message Queues, Services – SQL Databases, Data Connection, Etc. • Integrated IE Browser • Integrated D server • Debugging tool • Solution explorer MAHEDEE.NET 12
  • 13. Visual Studio.NET IDE… • HTML/XML Editors • Dynamic Help • Common Forms Editor – VB.NET, C++, and C# • Deployment facility • Beauty of .NET – Less line of code required – Require less time to develop – Lower deployment costs MAHEDEE.NET 13
  • 14. Visual Studio.NET IDE… Visual Studio .NET Environment MAHEDEE.NET 14
  • 15. Visual Studio.NET IDE... Create Project MAHEDEE.NET 15
  • 16. Visual Studio.NET IDE... Environment : After creating project MAHEDEE.NET 16
  • 17. ASP.net • Introduction – ASP - Active Server Pages – Introduced in 1998 as Microsoft's first server side scripting engine. – ASP.NET is a new ASP generation. – It is not compatible with Classic ASP, but may include Classic ASP. – ASP.NET pages are compiled, which makes them faster than Classic ASP. – ASP.NET pages have the extension .aspx, and are normally written in VB (Visual Basic) or C# (C sharp). MAHEDEE.NET 17
  • 18. ASP.net … •ASP.NET, the platform services that allow to program Web Applications and Web Services in any .NET language •ASP.NET Uses .NET languages to generate HTML pages. HTML page is targeted to the capabilities of the requesting Browser •ASP.NET “Program” is compiled into a .NET class and cached the first time it is called. All subsequent calls use the cached version. MAHEDEE.NET 18
  • 19. ASP.net … • Logical Evolution of ASP • Supports multiple languages • Improved performance • Control-based, event-driven execution model • More productive • Cleanly encapsulated functionality MAHEDEE.NET 19
  • 20. ASP.net … • ASP.net Web form – Allows clean cut code – Code-behind Web Forms – Easier and rich tool – Code within is compiled then executed – Improved handling of state information – Support for ASP.NET server controls – Data validation – Data bound grids MAHEDEE.NET 20
  • 21. Web Architecture in ASP.net MAHEDEE.NET 21
  • 22. Web Architecture in ASP.net … • The web application gets hosted in the server. The web client accepts the request and transmits it to the IIS using the HTTP Protocol. • HTTP is a transfer protocol for hyper text which is responsible for the transmission of request and reply. It uses actions like Get/Put and different Status Codes while transmission. It carries the request to the target server and also traverse back with the reply. Depending on the action and status code the client and server communicates. • In the server side IIS accepts the request and process the request. IIS checks for the resource and if it is a .net resource then IIS asks the .net framework to process the request. • Once the resource is ready then it is transferred to IIS again and using the HTTP the reply is sent to the client as it uses the HTTP channel so the reply has the content in hyper text. MAHEDEE.NET 22
  • 23. Software Architecture Basics • Software Architecture is the structure of the solution that meets – All of the technical and operational requirements – Optimizing quality attributes • Performance • Security – Increase manageability MAHEDEE.NET 23 client, users architect developers appearance, behaviour construction, co-operation architectural design visualises prescribes requirements solutions createsassess assess
  • 24. Software Architecture Basics … • Software architecture is – A blue print of system and project – The primary carrier of the system quality – An artifact for early analysis to make sure that the design approach will yield an acceptable system. – In short, architecture is the conceptual glue that holds every phase of the project together for all its many stakeholders. – Manages a collection of discrete objects – Implements a set of specific design elements MAHEDEE.NET 24
  • 25. Software Architecture Basics… Layer vs. Tier • Layer – Logical structure of the application – Typically layer is the logical organization of the code – It cannot deploy as different process or different server – Ex. Presentation, business and data layer • Tier – Physical structure of the application – It is said that tier is the physical deployment of the layer – It can deploy as different process or different server – Ex. Presentation, business and data tier MAHEDEE.NET 25
  • 26. ASP.net Control • AdRotator Displays a sequence of images • Button Displays a push button • Calendar Displays a calendar • CalendarDay A day in a calendar control • CheckBox Displays a check box • DropDownList Creates a drop-down list • HyperLink Creates a hyperlink • Label Displays static content which is programmable • LinkButton Creates a hyperlink button • ListBox Creates a single- or multi-selection drop-down list MAHEDEE.NET 26
  • 27. ASP.net Control… Panel Provides a container for other controls PlaceHolder Reserves space for controls added by code RadioButton Creates a radio button RadioButtonList Creates a group of radio buttons Table Creates a table TableCell Creates a table cell TableRow Creates a table row TextBox Creates a text box MAHEDEE.NET 27
  • 28. ASP.net Control… CompareValidator Compares the value of one input control to the value of another input control or to a fixed value CustomValidator Allows you to write a method to handle the validation of the value entered RangeValidator Checks that the user enters a value that falls between two values RequiredFieldValidator Makes an input control a required field ValidationSummary Displays a report of all validation errors occurred in a Web page RegularExpressionValidator Ensures that the value of an input control matches a specified pattern MAHEDEE.NET 28
  • 29. HTML Control… HtmlButton Controls a <button> HTML element HtmlForm Controls a <form> HTML element HtmlInputHidden Controls an <input type="hidden"> HTML element HtmlTable Controls a <table> HTML element HtmlTableCell Controls <td>and <th> HTML elements HtmlTableRow Controls a <tr> HTML element HtmlTextArea Controls a <textarea> HTML element MAHEDEE.NET 29
  • 30. ASP.net Provider Model • A provider is a software module that provides a uniform interface between a service and a data source. • To make ASP.net state storage both flexible and extensible MAHEDEE.NET 30 The membership provider model
  • 31. ASP.net Provider Model… • Membership • System.Web.Security.ActiveDirectoryMembershipProvider • System.Web.Security.SqlMembershipProvider • Role management • System.Web.Security.AuthorizationStoreRoleProvider • System.Web.Security.SqlRoleProvider • System.Web.Security.WindowsTokenRoleProvider • Site map • System.Web.XmlSiteMapProvider • Profile • System.Web.Profile.SqlProfileProvider MAHEDEE.NET 31
  • 32. ASP.net Provider Model… • Session state • System.Web.SessionState.InProcSessionStateStore • System.Web.SessionState.OutOfProcSessionStateStore • System.Web.SessionState.SqlSessionStateStore • Web events • System.Web.Management.EventLogWebEventProvider • System.Web.Management.SimpleMailWebEventProvider • System.Web.Management.TemplatedMailWebEventProvider • System.Web.Management.SqlWebEventProvider • System.Web.Management.TraceWebEventProvider • System.Web.Management.WmiWebEventProvider MAHEDEE.NET 32
  • 33. ASP.net Provider Model… • Web Parts personalization – System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider • Protected configuration – System.Configuration.DPAPIProtectedConfigurationProvider – System.Configuration.RSAProtectedConfigurationProvider MAHEDEE.NET 33
  • 34. Master Page/ Content Page Master Page • A Master page defines the site-wise layout and the regions editable on a content page-by-content page basis. • Firstly introduce in ASP.NET 2.0 on VS 2005. And in VS 2008 offers design-time support for nested master pages. • Special @Master directive <%@ Master Language="C#" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> MAHEDEE.NET 34
  • 35. Master Page/ Content Page Content Page • With the master page created, we are ready to start creating ASP.NET pages that are bound to the master page. Such pages are referred to as content pages. <asp:contentplaceholder id="Main" runat="server" /> MAHEDEE.NET 35
  • 36. Master Page/ Content Page MAHEDEE.NET 36 Fig – Sample Master Page
  • 37. ASP.net Themes • Themes is a cool and easy way to create a consistent look and feel across a page or an entire website • By using themes, you can easily customize your server controls with predefined looks • The themes feature allows to dictate the appearance of controls in your application using template files with a .skin extension, and with style sheets • A .skin file can contain one or more control skins for one or more control types. MAHEDEE.NET 37
  • 39. ASP.net Themes … MAHEDEE.NET 39 • The most important types of files in a Theme folder are the following: – Skin files – Cascading Style Sheet file
  • 40. ASP.net Themes … MAHEDEE.NET 40 • Adding Skins to theme (Default) – You must always include a Runat attribute, but you can never include the ID attribute when declaring a control in a Skin <asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” /> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Theme="Textbox" %>
  • 41. ASP.net Themes … MAHEDEE.NET 41 • Named skin – When you create a Named Skin, you can decide when you want to apply the Skin. <asp:TextBox SkinID=“DashedTextBox” BorderStyle=“Dashed” BorderWidth=“5px” Runat=“Server” /> <%@ Page Language=”C#” Theme=”Textbox” %> <asp:TextBox id=“txtFirstName” SkinID=“DashedTextBox” Runat=“server” />
  • 42. ASP.net Themes … MAHEDEE.NET 42 • Themes Versus StyleSheetThemes – You might want to display every Label in your web site with an orange back- Ground color except for one Label. In that case, it would be nice if there was a way to override the Skin property. <asp:Label BackColor=”Orange” Runat=”Server” /> <%@ Page Language=”C#” StyleSheetTheme=”Labelskin” %> <asp:Label id=”Label1” Text=”What color background do I have?” BackColor=”red” Runat=”server” /
  • 43. ASP.net Themes … MAHEDEE.NET 43 • Disabling Themes <asp:Calendar id=”Calendar2” EnableTheming=”false” Runat=”server” /> • Adding Cascading Style Sheets to Themes h1 { color: red; background-color:gray; } <h1>.:Cascading Style Sheet as a theme:.</h1>
  • 45. ASP.net Compilation • ASP.net first compiles the code into one or more assemblies in order to service request by the user. • ASP.net code can be write in many different languages – C#, Visual basic, J#, others. • Code is compiled to MSIL – MSIL is language and CPU independent • At run time, MSIL runs in the context of the .NET Framework, which translates MSIL into CPU-specific instructions for the processor MAHEDEE.NET 45
  • 46. ASP.net Compilation… • Benefits of compiling application code – Performance • Compiled code is much faster than scripting code – Security • Compiled code is difficult to reverse engineering – Stability • Code is checked at compile time for syntax errors, type safety, and other problems – Interoperability • MSIL code is supported by .NET, you can use assemblies that were originally written in other languages in your code MAHEDEE.NET 46
  • 47. ASP.net Compilation… • ASP.net compilation architecture features – Multiple language supports – Automatic compilation • ASP.NET automatically compiles your application code and any dependent resources the first time a user requests a resource from the Web site – Flexible deployment • ASP.NET compiler tool (ASPNET_Compiler.exe) provides the following pre compilation options: – In place compilation – Non-updateable full pre compilation – Updateable pre compilation – Extensible build system • Extend and customize the ASP.NET build system to compile custom resources by creating classes that inherit from the BuildProvider class MAHEDEE.NET 47
  • 48. ASP.net Compilation… • Dynamic compilation – ASP.NET dynamic compilation enables you to modify your source code without having to explicitly compile your code before you deploy your Web application – Compiling on first request – Recompiling on change – Compilation dependencies – Compilation output • Compilation folder output – %SystemRoot%Microsoft.NETFrameworkversionNumberTemporary ASP.NET Files • Compilation Folder Required Permissions • Compilation Folder Configurability – %FrameworkInstallLocation%Temporary ASP.NET Files – Support multiple languages MAHEDEE.NET 48
  • 49. ASP.net Compilation… • Disadvantages of dynamic compilation – Slower • Pages and code files must be compiled the first time they are requested – Dynamic compilation does not offer a means to identify compile-time bugs – Does not provide the ability to create a compiled version MAHEDEE.NET 49
  • 50. Website configuration • ASP.net uses a hierarchical system of configuration • At the top of the hierarchy is Machine.config file – C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGMachine.config MAHEDEE.NET 50
  • 51. Website configuration… • The CONFIG folder includes the following six files: – Machine.config—Contains the actual configuration settings. – Machine.config.default—Contains the default values for all configuration settings. – Machine.config.comments—Contains comments on each configuration setting. – Web.config—Contains the actual configuration settings. – Web.config.default—Contains the default values for all configuration settings. – Web.config.comments—Contains comments on each configuration setting MAHEDEE.NET 51
  • 52. Website configuration… Web.config file and it’s elements • ASP.NET Web.config file provides you a flexible way to handle all your requirements at the application level • Web.config files are stored in XML format which makes us easier to work with • IIS is configured in such a way that it prevents the Web.config file access from the browser. • The changes in Web.config don’t require the reboot of the web server. MAHEDEE.NET 52
  • 53. Website configuration… Hierarchy of the Web.config file MAHEDEE.NET 53
  • 54. Website configuration… Elements of Web.config file MAHEDEE.NET 54
  • 55. Website configuration… Elements of Web.config file MAHEDEE.NET 55 Session State Settings App Settings Connection string settings
  • 56. Website configuration… Programmatically accessing web.config file • Reading appSettings values string key = ConfigurationManager.AppSettings["AppKey"]; • Reading connectionstring values string cnn = ConfigurationManager.ConnectionStrings["conn"].ConnectionString; • Update the configuration section values Configuration config = WebConfigurationManager.OpenWebConfiguration("~/"); //Get the required section of the web.config file by using configuration object. CompilationSection compilation = (CompilationSection)config.GetSection("system.web/compilation"); //Update the new values. compilation.Debug = true; config.Save(); MAHEDEE.NET 56
  • 57. State Management • The State or Cache Management is nothing but the way to storing the data in Client-Side and in Server-Side using small memory. • There are two ways to manage state: – Client Side State management • Stores information on the client's computer – Server side state management • Store information on application server • Higher security than client-side options • Used more web server resources MAHEDEE.NET 57
  • 58. State Management… • Client side state management – View State – Hidden fields – Cookies – Query Strings – Control State • Server side state management – Application state – Session state MAHEDEE.NET 58
  • 59. State Management… View state – It stores data in the generated HTML using hidden field not on the server. – View State provides page level state management – As long as the user is on the current page, state is available and the user redirects to the next page and the current page state is lost – View State can store any type of data because it is object type but it is preferable not to store a complex type of data due to the need for serialization and deserialization on each post back MAHEDEE.NET 59
  • 61. State Management… Hidden Fields • Hidden fields are used to store data at the page level • Hidden fields are not rendered by the browser. • It's just like a standard control for which you can set its properties • Advantages: – Simple to implement for a page specific data – Can store small amount of data so they take less size. • Disadvantages: – Inappropriate for sensitive data – Hidden field values can be intercepted(clearly visible) when passed over a network MAHEDEE.NET 61
  • 62. State Management… Hidden Fields… <asp:HiddenField ID="HiddenField1" runat="server" /> protected void Page_Load(object sender, EventArgs e) { if (HiddenField1.Value != null) { int val= Convert.ToInt32(HiddenField1.Value) + 1; HiddenField1.Value = val.ToString(); Label1.Text = val.ToString(); } } protected void Button1_Click(object sender, EventArgs e) { } MAHEDEE.NET 62
  • 63. State Management… Cookies • A cookie is a small piece of text stored on user's computer • Every time a user visits a website, cookies are retrieved from user machine and help identify the user • Advantages: – Simplicity • Disadvantages: – Cookies can be disabled on user browsers – Cookies are transmitted for each HTTP request/response causing overhead on bandwidth – Inappropriate for sensitive data MAHEDEE.NET 63
  • 64. State Management… Cookies.. • Persistence Cookie: Cookies which you can set an expiry date time are called persistence cookies. Persistence cookies are permanently stored till the time you set. Response.Cookies["nameWithPCookies"].Value = "This is A Persistance Cookie"; Response.Cookies["nameWithPCookies"].Expires = DateTime.Now.AddSeconds(10); And the second one is: HttpCookie aCookieValPer = new HttpCookie("Persistance"); aCookieValPer.Value = "This is A Persistance Cookie"; aCookieValPer.Expires = DateTime.Now.AddSeconds(10); Response.Cookies.Add(aCookieValPer); MAHEDEE.NET 64
  • 65. State Management… Cookies… • Non-Persistence Cookie: Non persistence cookies are not permanently stored on the user client hard disk folder. It maintains user information as long as the user accesses the same browser. When user closes the browser the cookie will be discarded. Response.Cookies["nameWithNPCookies"].Value = "This is A Non Persistance Cookie"; And the second way is: HttpCookie aCookieValNonPer = new HttpCookie("NonPersistance"); aCookieValNonPer.Value = "This is A Non Persistance Cookie”; Response.Cookies.Add(aCookieValNonPer); How to read a cookie: if (Request.Cookies["NonPersistance"] != null) Label2.Text = Request.Cookies["NonPersistance"].Value; MAHEDEE.NET 65
  • 66. State Management… QueryString • Query strings are usually used to send information from one page to another page. • They are passed along with URL in clear text. • Advantages: – Simple to Implement • Disadvantages: – Human Readable – Client browser limit on URL length – Cross paging functionality makes it redundant – Easily modified by end user http://www.productdetails.aspx?productid=4 string v = Request.QueryString["productid"]; MAHEDEE.NET 66
  • 67. State Management… Application State • Application object is used to store data which is visible across entire application • Shared across multiple user sessions. • Data which needs to be persisted for entire life of application should be stored in application object. Application.Lock(); Application["mydata"]="mydata"; Application.UnLock(); MAHEDEE.NET 67
  • 68. State Management… Session Object • Session object is used to store state specific information per client basis. • It is specific to particular user. • Session data persists for the duration of user session you can store session's data on web server in different ways. Session[“userName"] = “mahedee”;//Set Value to The Session Label2.Text = Session[“userName"].ToString(); //Get Value from the Session MAHEDEE.NET 68
  • 69. State Management… Session State Mode • There are four session storage mechanisms provided by ASP.NET – InProc mode – StateServer mode – SQLServer mode – Custom mode • InProc Mode – InProc mode is the default mode provided by ASP.NET – In this mode, session values are stored in the web server's memory (in IIS). <sessionstate mode="InProc" cookieless="false" timeout="10“ /> MAHEDEE.NET 69
  • 70. State Management… Session State Mode… • StateServer mode – This mode could store session in the web server but out of the application pool. – Usually if this mode is used there will be a separate server for storing sessions, i.e., stateServer. – The benefit is that when IIS restarts, the session is available. – It stores session in a separate Windows service. – For State server session mode, we have to configure it explicitly in the web config file and start the aspnet_state service. <sessionstate mode="stateserver" cookieless="false" timeout="10" stateConnectionString="tcpip=127.0.0.1:42424"/> MAHEDEE.NET 70
  • 71. State Management… Session State Mode… • SQLServer mode – Session is stored in a SQL Server database. – This kind of session mode is also separate from IIS, i.e., session is available even after restarting the IIS server. – This mode is highly secure and reliable but also has a disadvantage that there is overhead from serialization and deserialization of session data. – This mode should be used when reliability is more important than performance. <sessionstate mode="sqlserver" cookieless="false" timeout="10" stateConnectionString="tcpip=127.0.0.1:4 2424" sqlConnectionString="Data Source=.SqlDataSource;User ID=userid;Password=password"/> MAHEDEE.NET 71
  • 72. State Management… Session State Mode… • Custom mode o Generally we should prefer InProc state server mode or SQL Server mode o If you need to store session data using other than these techniques then ASP.NET provides a custom session mode. o This way we have to maintain everything customized even generating session ID, data store, and also security. MAHEDEE.NET 72
  • 73. Caching • Caching is a technique of storing data in memory which takes time to create • There are two main types of caching: – Output caching • Cache the final render HTML of the page. • When the same page is requested again, the cached page is served • ASP.NET does not start the page life cycle and does not execute the code <%@ OutputCache Duration=”60” VaryByParam=”None”%> – Data caching • Flexible way to cache a DataSet object or any collection object date1 = DateTime.Now; Cache.Insert("Date1", date1, null, DateTime.Now.AddSeconds(20), TimeSpan.Zero); Or DataSet ds = new DataSet(); ds = (DataSet) Cache["MyDataSet"]; MAHEDEE.NET 73
  • 74. Caching… • Valid parameter for output caching – VaryByParam • <%@ OutputCache Duration="60" VaryByParam="CategoryID" %> – <%@ OutputCache Duration="60" VaryByParam="id;langid" %> • <%@ OutputCache Duration="60" VaryByParam="*" %> – VaryByControl • <%@ OutputCache Duration="20" VaryByControl="MyControlId" %> – VaryByCustom • <%@ OutputCache Duration="60" VaryByCustom="browser" %> MAHEDEE.NET 74
  • 75. Caching… • Cache Profile – Provides a facility to define cache settings in the web.config <system.web> <caching> <outputCacheSettings > <outputCacheProfiles> <add name ="ProductItemCacheProfile" duration ="60"/> </outputCacheProfiles> </outputCacheSettings> </caching> </system.web> <%@ OutputCache CacheProfile ="ProductItemCacheProfile" VaryByParam="None" %> MAHEDEE.NET 75
  • 76. Global.asax File • The Global.asax, also known as the ASP.NET application file • It is used to serve application-level and session-level events. • The Global.asax file resides in the root directory of an ASP.NET- based application. • At run time, Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived from the HttpApplication base class. • The Global.asax file itself is configured so that any direct URL request for it is automatically rejected • External users cannot download or view the code written within it. MAHEDEE.NET 76
  • 78. Culture (Localization and globalization) • Localization is the process of adapting a software application for a specific locale. • Globalization is the process of identifying the localizable resources of the application. • To support Localization and Globalization, we use – System.Globalization - can define culture specific information – System.Resources - ResourceManager Class – System.Threading namespaces - supports for multithreaded programming MAHEDEE.NET 78
  • 79. Culture (Localization and globalization)… • Has two culture values – Culture – UICulture • Culture value is used for date and number formatting • UICulture values are used to determine culture specific resources • Can set culture and UICulture values in the application as follows. Using <globalization> element of Web.Config. Using @Page directive in the Page. e.g. Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-GB"); Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-GB"); MAHEDEE.NET 79
  • 80. Culture (Localization and globalization)… • Two main properties of Page class have an effect on localization: – UICulture • Used to specify which resource files are loaded for the page – Culture • Determines how strings such as dates, numerals, and currency amounts are formatted • Setting culture manually <%@ Page Language="C#" Culture="bn-BD" UICulture="bn-BD" AutoEventWireup="true" CodeFile="ManualCulture.aspx.cs" Inherits="ManualCulture" %> this.lblMsg.Text = DateTime.Today.ToString(); • Setting the Culture in the Web Configuration File <globalization culture="en-US" uiCulture="en-US"/> MAHEDEE.NET 80
  • 81. Culture (Localization and globalization)… • Creating local resource <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="LocalizablePage.aspx.cs" UICulture="auto" Inherits="LocalizablePage" %> <asp:Button id=”btnSubmit” meta:resourceKey=”btnSubmit” Text=”Click Me!” ToolTip=”Click to show message” OnClick=”btnSubmit_Click” Runat=”server” /> <asp:Label id=”lblMessage” meta:resourceKey=”lblMessage” Text=”Thank You!” Visible=”false” Runat=”server” / MAHEDEE.NET 81
  • 82. ASP.net Grid view • Powerful server side control • Excellent data binding architecture • Including Sorting, paging, deleting option MAHEDEE.NET 82
  • 83. IIS • IIS stands for Internet Information Server • IIS is web server application and set of feature extension modules • A Web server is primarily a server application that can be contacted using a bunch of Internet protocols, such as – HTTP – File Transfer Protocol (FTP) – Simple Mail Transfer Protocol (SMTP) • Developed by Microsoft MAHEDEE.NET 83
  • 84. IIS … • HTTP Request – When the client request for the resource using HTTP Pipeline. – Example GET /index.html HTTP/1.1 Host: www.example.com • HTTP Response – The response from the server against a request – Example HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Content-Type: text/html; charset=UTF-8 MAHEDEE.NET 84
  • 85. IIS … MAHEDEE.NET 85 Fig – Processing server page Processing server page
  • 86. IIS … • Processing server page – Request is sent by the web browser through the HTTP Protocol. – The request hits the IIS where the request has the resource location. – HTTP carries the request in a hyper text format. When IIS gets the request then it checks in the isapi extension to map the worker process. – Inetinfo.exe at the IIS is responsible for the process. aspnet_isapi.dll is mapped for the asp. net application. Then according to the mapping table if it is an aspx page then aspnet_wp.exe handles the request from asp. net. – It checks for the resource and after finding the framework executes the assembly and generates the html page for the client. – IIS then again takes the response from .NET and passes it via HTTP protocol. MAHEDEE.NET 86
  • 87. IIS … • Application pool – Concept of application pool is introduced in IIS 6.0 – Application pools are used to separate sets of IIS worker processes – Application pools used to isolate our web application for better security, reliability, and availability and performance – Keep running without impacting each other – Isolation of Different Web Application – Individual worker process for different web application – More reliably web application – Better Performance MAHEDEE.NET 87
  • 88. ASP.net Page Lifecycle MAHEDEE.NET 88 Fig – ASP.net page lifecycle
  • 89. ASP.net Page Lifecycle … MAHEDEE.NET 89 Fig – Events in the page lifecycle
  • 90. ASP.net Page Lifecycle … MAHEDEE.NET 90
  • 91. ASP.net Website deployment in IIS MAHEDEE.NET 91
  • 92. ASP.net Website deployment in IIS … MAHEDEE.NET 92 Convert to Web Application
  • 93. ASP.net Website deployment in IIS … MAHEDEE.NET 93 Create application pool
  • 94. ASP.net Website deployment in IIS … MAHEDEE.NET 94 Assign application pool to the application
  • 95. ASP.net Website deployment in IIS … MAHEDEE.NET 95 Assign application pool to the application …

Editor's Notes

  • #4: Extra Topic: Global Application Class (Global.asax),ASP.net web service, Crystal report and ASP.net
  • #5: Extra Topic: Global Application Class (Global.asax),ASP.net web service, Crystal report and ASP.net
  • #9: The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web based applications alike. In the above slide these classes have been divided into 4 areas. ASP.NET provides the core Web infrastructure such as Web Forms for UI based development and Web Services for programmatic interface development, User interface development on the Windows platform can be done using Windows Forms ADO.NET and XML provide the functionality for data access. Finally, the core base classes provide infrastructure services such as security, transaction management etc.
  • #10: The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web based applications alike. In the above slide these classes have been divided into 4 areas. ASP.NET provides the core Web infrastructure such as Web Forms for UI based development and Web Services for programmatic interface development, User interface development on the Windows platform can be done using Windows Forms ADO.NET and XML provide the functionality for data access. Finally, the core base classes provide infrastructure services such as security, transaction management etc.
  • #11: The code, which is developed outside .NET, Framework is known as unmanaged code.   Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such as C++ can be used to write such applications, which, for example, access low - level functions of the operating system. Background compatibility with code of VB, ASP and COM are examples of unmanaged code.
  • #23: HTTP is a simple request-response protocol that normally runs over TCP. It is also possible to pipeline requests, that is, send request 2 Before the response to request 1 has arrived.
  • #24: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #25: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #26: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #27: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #28: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #29: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #30: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.
  • #32: In any application, if you want to store the user information other than the Registration details like their address, user's interest, themes, etc., you can use the SqlProfileProvider.
  • #45: Extra Topic: Global Application Class (Global.asax),ASP.net web service, Crystal report and ASP.net
  • #46: MSIL – Microsoft intermediate language
  • #47: Compiled code is much faster than scripting languages such as ECMAScript or VBScript because it is a closer representation to machine code and does not require additional parsing.
  • #48: In place compilation means on demand compilation, No-updatable means not updatable, updatable pre compilation – Example: partially release
  • #75: VarByParam=”*” tells ASP.NET to store a separate copy of the page for different query string parameters.
  • #76: Suppose if you embed cache setting into the page and you want to change cache duration from 20 to 30 seconds, then you need to change duration in all pages. It is better to save cache setting in web.config and you can easily manage your cache setting.
  • #77: Suppose if you embed cache setting into the page and you want to change cache duration from 20 to 30 seconds, then you need to change duration in all pages. It is better to save cache setting in web.config and you can easily manage your cache setting.
  • #79: Imagine a scenario where we have a web page with a lot of labels and text in it. Without ASP.NET globalization mechanism in place, if I have to render these labels and text based on current locale, then I might end up having a lot of switch cases or if statements. To be precise, one case for each supported language. Now this technique could work but it is time consuming, error prone and sometimes frustrating for the developer. To avoid having to write such code, ASP.NET provides us Resource files.
  • #80: Local resources are the resources which are specific for a page, i.e., there will be local resource file for every page. Global resources and the resources that are common for the whole website, i.e., one resource file that can be accessed by all the pages (there can be multiple global resource files too).
  • #89: This article aims at understanding the role of HTTPHandler and HTTPModule in ASP.NET applications. We will try to work on a basic example to see how these can be implemented.