0% found this document useful (0 votes)
30 views17 pages

CH 1 - Introduction of

The document provides a comprehensive overview of ASP.NET, including its history, functionality, and comparison with ASP Classic. It discusses the architecture of ASP.NET, its components, and key concepts such as session management, state management, and compilation techniques. Additionally, it highlights the differences between ASP.NET and its predecessor, emphasizing improvements in performance, scalability, and support for multiple programming languages.

Uploaded by

daniyalnick038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views17 pages

CH 1 - Introduction of

The document provides a comprehensive overview of ASP.NET, including its history, functionality, and comparison with ASP Classic. It discusses the architecture of ASP.NET, its components, and key concepts such as session management, state management, and compilation techniques. Additionally, it highlights the differences between ASP.NET and its predecessor, emphasizing improvements in performance, scalability, and support for multiple programming languages.

Uploaded by

daniyalnick038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

 Evaluation of Asp.

Net
 What is ASP?
ASP is known as Active Server Pages which is produced by Microsoft Team in the early of year
1990. Microsoft Active Server Pages (ASP) is allowed us to build dynamic and interactive web
applications. ASP classic is easily to let web application link to database inside the web
application. The web application created by ASP does not affect by using different type of the
web browser. The file extension for ASP is .asp. Example: http://www.asp.com/test.asp.
The default programming language to build ASP web site is using VBscript to buid, but it is
support other programming languages like JSscript (JavaScript from Microsoft). But ASP.net
allows web developer use either visual basic (VB) or ASP.net language to build the web
applications.
 What is Web server?
Web servers are the tool that can manage web application that built by the web developers and
make all the web application available to the client web browser. It can success connected
through a local network or over the Internet (two different machines or same machine). While
there are many Web servers available which one of the common ones is Apache, Internet
Information Services (IIS), and iplanet Enterprise Server. (DotNetNuke, 2009)
To test or run ASP.NET Web applications, you need a Web server
Internet Information Services (IIS)
IIS Web server comes bundled with Windows 2000, Windows XP Professional, and Windows
Server 2003.
 How does ASP work?
An ASP page is stored at server-side. So, client cannot simply view an ASP page on the web
browser. They need to request the ASP page through the web server which is supports for ASP.
When a client request an ASP page through the web browser, the web server will locates the
ASP file on the hard drive and interpret it. After that, it will remove all the ASP Script and
replace them with HTML Text.
Web server locates the ASP file and replace with HTML text and send back to the web browser.
 Problem with ASP Classic
ASP is using html controls to interact with the user. Although ASP is having few good functions
to build web application, it still not perfect yet to satisfy web developer in some of the areas.
For example, ASP needs to code all the things in a single web page including the functions and
interface. It is not very convenience when need to modify or update some of the data on the
web page.
Besides that, another disadvantages using ASP classic to build web page is lack of the
performance and scalability, which means the web page that built by ASP classic will not auto
fix the web pages with the web browser. The layout of the web page will out of the margin and
the content cannot show as what web developer have designed for.
 How does ASP.net work?
Think of ASP.NET web pages as normal HTML pages that have sections marked up for special
consideration. When .NET is installed, IIS Web server on the local machine will automatically to
check for files with the extension .aspx and it will use the ASP.NET module that have a a file
called aspnet_isapi.dll to handle them.
First of all, the client requests the web page from the web server. Then the web server started
to locates the instruction file. Meanwhile, the ASP.net code is sent to the Common Language
Runtime for compilation. After that, the HTML stream returned to the web browser. After the
web browser get the HTML code. It will processes the HTML code and display the content of the
page to the client.
 ASP.NET compared with ASP Classic
Now, I will differentiate the asp version between ASP.net and ASP classic. What are the changes
in ASP.net instead of the ASP classic and what is the improvement from ASP classic. Besides, I
am also focus on what are the new features in ASP.net.
First of all, the mainly ASP.net difference from ASP classic is ASP.net is ASP.net is support more
language for scripting. For example, Asp.net supports visual basic language, C#, C++, Jscript and
ADO.net as well. Support multiple languages will getting more web developer choose ASP.net
as their first choice to develop a web page and web applications and let different background
programmer can work together by using a same application.
Besides, there are few points to compare between ASP.net and ASP classic. One of the aspects
is compilation. ASP classic is built up by Jscript and it only interpreted the Script line by line
when the page is requested. Moreover, ASP.net compilation is totally different with ASP classic.
ASP.net is automatically compiling all the code while the code is first time executed. The
compiled code will store inside .NET classes within assembly. .NET classes are including the
server-side coding and HTML code. So, when ASP.NET page is executed for first time, the
compiled code will store inside the .NET classes. Next time will render the ASP.net page by
execute the compiled code that has created. The performance for ASP.net will be increased
because there are no longer like the ASP classic has the difference between the compiled code
and the coding within the server-side languages within asp web page.
ASP.net performance is faster due to the compiled code but ASP classic is using the scripting
languages like VBScript. VBScript is representing to machine code and did not require any
additional parsing. That is why web developer is preferred to use ASP.net instead of using ASP
classic.
On the other hand, the difference between ASP.net and ASP classic is the scalability factor. For
ASP classic, the components inside the web pages are not easy to update, replace and maintain
it. If want to update particular component, IIS is required to shut down then only can
successfully replace or update the component. After done all the modification, IIS need to
restart once.( Neel Sus. 2009).
For ASP.net, it was different with ASP classic which it is scalable and easy to do modification on
the web pages. The term of ‘Xcopy’ command is used to build an efficiency ASP.net web
application page. The ‘Xcopy’ term is to copy a file to another location. It is allow to do the
modification without need of restart of web server. The web developer can do the changes on
the web application and no web server restart is required to take effect. It will direct take effect
once the web application is requested.(Bean Software. 2002).

 ASP.NET Fundamentals
ASP.NET Fundamentals covers basic topics of ASP.NET Framework such as Session, Cookie,
HTTP Handler, HTTP Module, Forms Authentication, Caching, Exception Handling, ASP.NET
Request Processing etc.
1. What is ASP.NET?
ASP.NET is a framework developed by Microsoft to build dynamic web applications. There are
two programming models to develop web applications using ASP.NET.
 ASP.NET Web Forms
 ASP.NET MVC
Both programming models use ASP.NET on the top of that.
ASP.NET is also a part of Microsoft's .NET Framework. We can write ASP.NET Applications code
in any .NET Framework supported language i.e. C#, J#, F#, VB etc.
ASP.NET applications can only be hosted under IIS Server which is available on Window
Operating Systems only.
Microsoft has now moved it's further development from this traditional .NET Framework
(Windows only) to new .NET Core, which is Cross Platform (supporting Windows, MAC OS, and
Linux) framework to develop software applications i.e. Desktop, Web, Console, Mobile
Applications.

2. What is Session in ASP.NET?

Sessions are basically server variables that are used to store information on Server.
Session in ASP.NET enables you to store information on server & access that stored information
on your sub-sequent web-requests.
HTTP is a stateless protocol, it means every web-request is a new web-request in itself. It does
not hold or preserve previous request data. So, Sessions provides us a way to identify the user
from on the subsequent web requests.
How to set a value in session in C#:
Session["Email"] = "[email protected]";
How to retrieve the stored value from the session:
string email = Convert.ToString(Session["Email"])
3. What is Cookie in ASP.NET?
An HTTP Cookie is a piece of data that is stored on the user's browser. Whenever you make a
web-request, all the cookies associated with the domain are sent with the web- request.
On the server, we can access those cookies & read values from them. Hence, cookies help us in
maintaining state by storing data on client's machine.
You can add a cookie in ASP.NET in following way:
Response.Cookies.Add(new HttpCookie("Email", "[email protected]"));
To read the cookie, you can use below syntax:
string email = Convert.ToString(Request.Cookies["Email"]);

4. What is State Management in ASP.NET? Explain various techniques available for State
Management in ASP.NET?
State Management is a technique in ASP.NET to maintain states. There are following ways in
ASP.NET to maintain states:
1. Server Side
2. Session
3. Application
4. Client Side
5. Cookies
6. Query String
7. View States
8. Hidden Fields
5. Difference between Response.Redirect() and Server.Transfer() ?
 Response.Redirect
Response.Redirect() is the most common way of redirecting a user from one web-page to
another. For example, Whenever you write Response.Redirect("~/default.aspx") in the code,
server sends the response to browser with 302 status code. It also sends the location where the
browser needs to redirect the user in Location header in the response. So, whenever, the
browser receives 302 status code, it looks for Location header in the response and redirects the
user to that web page.
 Server.Transfer
Server.Transfer() is the way of redirecting a user from the server. For example, if you write
Server.Transfer("~/default.aspx") in code, the server will redirect user to default.aspx page &
will display the response provided by default.aspx page.
 Differences between Response.Redirect() and Server.Transfer()
In Response.Redirect(), it's browser's responsibility to redirect the user to a web-page while
in Server.Transfer() it is Server's responsibility.
In Response.Redirect(), URL changes to the new one while in Server.Transfer() URL doesn't
changes.
Server.Transfer() is faster than Response.Redirect().

 Understanding Detailed Architecture of ASP.NET


ASP.NET has extended into multiple code frameworks, including Web Forms, MVC, Web Page,
Web API and SignalR. Initially, all these grew up separately but now they are coming together.
Now, you can develop your web site or web application by using Web Forms or MVC or Web
Page and services by using Web API or SignalR.
Components of Asp.NET 4.5 Architecture
1. .NET Framework
.Net framework is an integrated component of windows operating system that supports
development and execution of next generation applications, Windows store apps and services.
2. ASP.NET Framework
ASP.Net Framework is used to create dynamic website, web application and web services. It is
built on the top of .NET Framework.
Asp.NET Framework provides you various capabilities like Hosting Model, Site/Service
Management, Protocol Abstraction, Security, Caching capability, Routing and Model Binding
etc.
Mainly, Asp.Net can be divides into two parts - Asp.Net Sites and Asp.Net Services.
 Asp.NET Site
There are following flavours of Asp.NET Site -
1) Web Forms
This is the traditional event driven development model. It has drag and drop server controls,
server events and state management techniques. This best for rapid application development
(RAD) with powerful data access.
2) MVC
This is a lightweight and MVC (Model, View, Controller) pattern based development model. It
provides full control over mark-up and support many features that allow fast & agile
development. This best for developing lightweight, interactive and device oriented (i.e.
compatible to smart phones, iPhone, tablet, laptop etc.) web application with latest web
standards.
3) Web Pages
This is also a lightweight and Razor syntax based development model. It has built-in template
and helpers also provide full control over mark-up. It is best for developing beautiful web
application with latest web standards. You can also use WebMatrix which is a free tool and has
built-in template; for developing Asp.Net Web Page.
4) SPA
SPA stands for Single Page Application which helps you to build web applications that include
significant client-side interactions using HTML5, CSS3 and JavaScript. It is best to make highly
interactive single page dashboard web applications.
5) Asp.NET Services
There are two ways to make Asp.Net Services as given below –
6) Web API
Asp.Net Web API is a framework for building HTTP services that can be consume by a broad
range of clients including browsers, mobiles, iphone and tablets.
7) SignalR
ASP.NET SignalR is a library that simplifies the process of adding real-time web functionality to
applications. Real-time web functionality is the ability to have server code push content to
connected clients instantly as it becomes available, rather than having the server wait for a
client to request new data.
8) Visual Studio 2012
The Visual Studio IDE offers a set of tools that help you to write and modify the code for your
programs, and also detect and correct errors in your programs. Using Visual Studio 2012 you
can build Windows Store apps, desktop apps, mobile apps, ASP.NET web apps, and web
services.

 Compilation Technique of ASP.Net


 Compiling on First Request
By default, ASP.NET Web pages and code files are compiled dynamically when users first
request a resource, such as an ASP.NET page (.aspx file), from a Web site. After pages and code
files have been compiled the first time, the compiled resources are cached, so that subsequent
requests to the same page are extremely efficient.
ASP.NET supports the dynamic compilation of ASP.NET pages (.aspx files), ASP.NET Web
services (.asmx files), ASP.NET HTTP handlers (.ashx files) and ASP.NET application files
(Global.asax), as well as other files, such as source code and class files. For more information
about ASP.NET file types.
 Recompiling on Change
Any changes to a dynamically compiled file will automatically invalidate the file's cached
compiled assembly and trigger recompilation of all affected resources. The next time a request
to the code is made, ASP.NET recognizes that the code has changed and recompiles the
affected resources of the Web application. This system enables you to quickly develop
applications with a minimum of compilation processing overhead. (Note that depending on the
change to the resources, the result can range from recompiling a single page to recompiling the
whole Web site.)
 Compilation Dependencies
When the first request is made to an application, ASP.NET compiles files in a specific order. The
first items to be compiled are referred to as the top-level items. After the first request, the top-
level items are recompiled only if a dependency changes.
Top-level items include the App_GlobalResources folder, the App_WebResources folder, profile
properties, the App_Code folder, and the Global.asax file. After the top-level items are
compiled, ASP.NET compiles additional items. These items include the App_LocalResources
folder, individual ASP.NET pages (.aspx files), ASP.NET user controls (.ascx files), ASP.NET HTTP
Handlers (.ashx files), and ASP.NET HTTP modules (.asmx files), as well as themes, master pages,
and other source files.
 Compilation Output
When your code is compiled, the resulting assemblies are cached in a folder on the server. This
folder requires appropriate permissions so that your code compiles and runs correctly. You can
configure both the compilation folder location and the permissions under which your code
compiles and operates.

 Application Location
The asp.net application folder is contains list of specified folder that you can use of specific type
of files or content in an each folder. The root folder structure is as following
1. BIN
2. App_Code
3. App_GlobalResources
4. App_LocalResources
5. App_WebReferences
6. App_Data
7. App_Browsers
8. App_Themes
1. Bin Directory
It is contains all the precompiled .Net assemblies like DLLs that the purpose of application uses.
2. App_Code Directory
It is contains source code files like .cs or .vb that are dynamically compiled for use in your
application. These source code files are usually separate components or a data access library
3. App_GlobalResources Directory
It is contains to stores global resources that are accessible to every page.
4. App_LocalResources Directory
It is serves the same purpose as app_globalresources, exept these resources are accessible for
their dedicated page only
5. App_WebReferences Directory
It is stores reference to web services that the web application uses.
6. App_Data Directory
It is reserved for data storage and also mdf files, xml file and so on.
7. App_Browsers Directory
It is contains browser definitions stored in xml files. These xml files define the capabilities of
client side browsers for different rendering actions.
8. App_Themes Directory
It is contains collection of files like .skin and .css files that used to application look and feel
appearance.

 Web Page and Web Site life cycle


When an ASP.Net application is launched, there are series of steps which are carried out. These
series of steps make up the lifecycle of the application.
Let's look at the various stages of a typical page lifecycle of an ASP.Net Web Application.

 ASP.Net Lifecycle
1) Application Start - The life cycle of an ASP.NET application starts when a request is made
by a user. This request is to the Web server for the ASP.Net Application. This happens
when the first user normally goes to the home page for the application for the first time.
During this time, there is a method called Application_start which is executed by the
web server. Usually, in this method, all global variables are set to their default values.

2) Object creation - The next stage is the creation of the HttpContext, HttpRequest &
HttpResponse by the web server. The HttpContext is just the container for the
HttpRequest and HttpResponse objects. The HttpRequest object contains information
about the current request, including cookies and browser information. The
HttpResponse object contains the response that is sent to the client.

3) HttpApplication creation - This object is created by the web server. It is this object that
is used to process each subsequent request sent to the application. For example, let's
assume we have 2 web applications. One is a shopping cart application, and the other is
a news website. For each application, we would have 2 HttpApplication objects created.
Any further requests to each website would be processed by each HttpApplication
respectively.

4) Dispose - This event is called before the application instance is destroyed. During this
time, one can use this method to manually release any unmanaged resources.

5) Application End - This is the final part of the application. In this part, the application is
finally unloaded from memory.

 What is ASP.Net Page Lifecycle?


When an ASP.Net page is called, it goes through a particular lifecycle. This is done before the
response is sent to the user. There are series of steps which are followed for the processing of
an ASP.Net page.
Let's look at the various stages of the lifecycle of an ASP.Net web page.
ASP.Net Page Lifecycle
1. Page Request-
This is when the page is first requested from the server. When the page is requested,
the server checks if it is requested for the first time. If so, then it needs to compile the
page, parse the response and send it across to the user. If it is not the first time the page
is requested, the cache is checked to see if the page output exists. If so, that response is
sent to the user.
2. Page Start –
During this time, 2 objects, known as the Request and Response object are created. The
Request object is used to hold all the information which was sent when the page was
requested. The Response object is used to hold the information which is sent back to
the user.
3. Page Initialization –
During this time, all the controls on a web page is initialized. So if you have any label,
textbox or any other controls on the web form, they are all initialized.
4. Page Load –
This is when the page is actually loaded with all the default values. So if a textbox is
supposed to have a default value, that value is loaded during the page load time.
5. Validation –
Sometimes there can be some validation set on the form. For example, there can be a
validation which says that a list box should have a certain set of values. If the condition
is false, then there should be an error in loading the page.
6. Postback event handling –
This event is triggered if the same page is being loaded again. This happens in response
to an earlier event. Sometimes there can be a situation that a user clicks on a submit
button on the page. In this case, the same page is displayed again. In such a case, the
Postback event handler is called.
7. Page Rendering –
This happens just before all the response information is sent to the user. All the
information on the form is saved, and the result is sent to the user as a complete web
page.
8. Unload –
Once the page output is sent to the user, there is no need to keep the ASP.net web form
objects in memory. So the unloading process involves removing all unwanted objects
from memory.

 Structure of an Asp.net page


The main components of an ASP.NET page are:
 Directives
 Code Declaration Blocks
 ASP.NET Controls
 Code Render Blocks
 Server-Side Comments
 Server-Side Include Directives
 Literal Text and HTML Tags.

 Directives
A directive controls how the page is compiled. It is marked by the tags, <%@ and %>. It can
appear anywhere in a page. But, normally it is placed at the top of a page. The main types of
directives are:
• Page
• Import

A Page directive is used to specify the default programming language for a page.
<%@ Page Language="C#" %>
OR
<%@ Language="C#" %>

Some namespaces are imported into an ASP.NET page by default. If you wish to use a class that
is not contained in the default namespaces, you must import its namespace.
<%@ Import Namespace="System.Data.SqlClient" %>
 Code Declaration Blocks
A code declaration block contains all the application logic for a page. It also includes
declarations of global variables, and functions. It must be written within the script runat=
"server" tag.
The <script> tag has two optional parameters:
• Language: You can specify the programming language to be used within the <script> tag.
Otherwise, the language specified in the Page directive is used.
• SRC: You can specify an external file that contains the code block.
There is no difference in output between writing the code on the same page and including an
external script file.
 ASP.NET Controls
ASP.NET controls can be mixed with text and static HTML in a page. All controls must appear
within a <form runat= "server"> tag. Some controls such as <span runat= "server"> and the
Label control can appear outside this tag. You can have only one form per page in ASP.NET.
 Code Render Blocks
If you wish to execute code within HTML, you can include the code within code render blocks.
There are two types of code render blocks:
• Inline Code: It executes a statement or series of statements. It is marked by the characters <%
and %>.
• Inline Expressions: They display the value of a variable or method. They can be considered as
shorthand notation for the Response.Write method. They are marked by the characters <%=
and %>.
 Server-Side Comments
You can add comments in server-side code using the characters <%-- and --%>. The main use of
these comment blocks is to add documentation to a page.
 Server-Side Include Directives
 You can include a file in an ASP.NET page by using a server-side include directive. It is
executed before any of the code in the page. If the file is in the same directory or in a
sub-directory of the page including the file, this directive is written as:
<!-- #INCLUDE file="includedfile.aspx" -->

You can also specify the virtual path of the file. To include a file located in the directory
MyAspx under the wwwroot directory, you will write the directive as:
<!-- #INCLUDE virtual="/MyAspx/includedfile.aspx" -->

 HTML Tags and Literal Text


You can build the static part of an ASP.NET page using HTML tags and literal text. The HTML
content of your page is also compiled along with the rest of the contents.
The literal text has been made bold and converted to uppercase before being rendered in the
browser.

 The Page Directive


The Page directive defines the attributes specific to the page file for the page parser and the
compiler.
The basic syntax of Page directive is:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" Trace="true" %>
The attributes of the Page directive are:

Attributes Description

AutoEventWireup The Boolean value that enables or disables page events that are being
automatically bound to methods; for example, Page_Load.

Buffer The Boolean value that enables or disables HTTP response buffering.

ClassName The class name for the page.

ClientTarget The browser for which the server controls should render content.

CodeFile The name of the code behind file.

Debug The Boolean value that enables or disables compilation with debug
symbols.

Description The text description of the page, ignored by the parser.

EnableSessionState It enables, disables, or makes session state read-only.

EnableViewState The Boolean value that enables or disables view state across page
requests.

ErrorPage URL for redirection if an unhandled page exception occurs.

Inherits The name of the code behind or other class.

Language The programming language for code.

Src The file name of the code behind class.

Trace It enables or disables tracing.

TraceMode It indicates how trace messages are displayed, and sorted by time or
category.
Transaction It indicates if transactions are supported.

ValidateRequest The Boolean value that indicates whether all input data is validated
against a hardcoded list of values.

 Self-page and Cross page posting


 Cross-Page Posting
By default, buttons in an ASP.NET Web page post the page to itself. Cross-page posting enables
you to configure a button on an ASP.NET Web page to post the current page to a different
page. A typical example is when creating a multi-page form. You can configure buttons on the
page to move to the next and previous pages of the form.
Cross-page posting is similar to hyperlinks in that the transfer is initiated by a user action.
However, in cross-page posting, the target page is invoked using an HTTP POST command,
which sends the values of controls on the source page to the target page. In addition, if the
source and target page are in the same Web application, the target page can access public
properties of the source page. As always, all of the pages in the application can share
information stored in session state or application state.
To post an ASP.NET Web page to another page
1. Add a button control to your Web page, such as a Button, LinkButton,
or ImageButton control.
2. Set the PostBackUrl property for the control to the URL of the page to which you want
to post the ASP.NET Web page.

 Postback and ViewState concepts


Another approach to saving data for the user, is the ViewState. As described elsewhere in this
tutorial, the ViewState allows ASP.NET to repopulate form fields on each postback to the
server, making sure that a form is not automatically cleared when the user hits the submit
button. All this happens automatically, unless you turn it off, but you can actually use the
ViewState for your own purposes as well. Please keep in mind though, that while cookies and
sessions can be accessed from all your pages on your website, ViewState values are not carried
between pages. Here is a simple example of using the ViewState to carry values between
postbacks:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ViewState</title>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox runat="server" id="NameField" />
<asp:Button runat="server" id="SubmitForm" onclick="SubmitForm_Click" text="Submit &
set name" />
<asp:Button runat="server" id="RefreshPage" text="Just submit" />
<br /><br />
Name retrieved from ViewState: <asp:Label runat="server" id="NameLabel" />
</form>
</body>
</html>
And the CodeBehind:
using System;
using System.Data;
using System.Web;

public partial class _Default : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if(ViewState["NameOfUser"] != null)
NameLabel.Text = ViewState["NameOfUser"].ToString();
else
NameLabel.Text = "Not set yet...";
}

protected void SubmitForm_Click(object sender, EventArgs e)


{
ViewState["NameOfUser"] = NameField.Text;
NameLabel.Text = NameField.Text;
}
}
Try running the project, enter your name in the textbox and press the first button. The name
will be saved in the ViewState and set to the Label as well. No magic here at all. Now press the
second button. This one does nothing at all actually, it just posts back to the server.
As you will notice, the NameLabel still contains the name, but so does the textbox. The first
thing is because of us, while the textbox is maintained by ASP.NET it self. Try deleting the value
and pressing the second button again. You will see that the textbox is now cleared, but our
name label keeps the name, because the value we saved to the ViewState is still there!

 Application Folder
The asp.net application folder is contains list of specified folder that you can use of specific type
of files or content in an each folder. The root folder structure is as following
1. BIN
2. App_Code
3. App_GlobalResources
4. App_LocalResources
5. App_WebReferences
6. App_Data
7. App_Browsers
8. App_Themes
1. Bin Directory
It is contains all the precompiled .Net assemblies like DLLs that the purpose of application uses.
2. App_Code Directory
It is contains source code files like .cs or .vb that are dynamically compiled for use in your
application. These source code files are usually separate components or a data access library
3. App_GlobalResources Directory
It is contains to stores global resources that are accessible to every page.
4. App_LocalResources Directory
It is serves the same purpose as app_globalresources, exept these resources are accessible for
their dedicated page only
5. App_WebReferences Directory
It is stores reference to web services that the web application uses.
6. App_Data Directory
It is reserved for data storage and also mdf files, xml file and so on.
7. App_Browsers Directory
It is contains browser definitions stored in xml files. These xml files define the capabilities of
client side browsers for different rendering actions.
8. App_Themes Directory
It is contains collection of files like .skin and .css files that used to application look and feel
appearance.

You might also like