SlideShare ist ein Scribd-Unternehmen logo
1 von 16
ASP.NET STATE MANAGEMENT
Session-VIII
In this session we will learn about
ASP.NET state management overview
Client –side state management
Server-side state management
state management overview
HTTP ( Hyper Text Transfer Protocol) is a stateless
protocol. When the client disconnects from the server,
the ASP. Net engine discards the page objects. This way
each web application can scale up to serve numerous
requests simultaneously without running out of server
memory.
However, there need to be some technique to store the
information between requests and to retrieve it when
required. This information i.e., the current value of all
the controls and variables for the current user in the
current session is called the State.
ASP.NET State Management
 In a Web programming, this would typically mean
that all information associated with the page and the
controls on the page would be lost with each round
trip. To overcome this inherent limitation of
traditional Web programming,
Continue…….
ASP.NET includes several options that help you
preserve data on both a per-page basis and an
application-wide basis.
We can secure data at both side: Serer side and
Client side using
 Client Side State Management
 Server side State Management
Storing page information using client-side
options doesn't use server resources.
These options typically have minimal security
but fast server performance because the demand on
server resources is modest.
Client-Based State Management
Continue…….
The following are the client-side state management
options that ASP.NET supports:
 View state
 Hidden fields
 Cookies
 Query strings
View State
View State
 The View State property provides a dictionary
object for retaining values between multiple
requests for the same page.
 This is the default method that the page uses to
preserve page and control property values between
round trips.
Continue…….
 When the page is processed, the current state of the
page and controls is hashed into a string and saved
in the page as a hidden field.
 When the page is posted back to the server, the page
parses the view-state string at page initialization and
restores property information in the page.
Hidden Fields
Hidden Fields
ASP.NET allows you to store information in a Hidden
Field control, which renders as a standard HTML
hidden field.
When a page is submitted to the server, the content
of a hidden field is sent in the HTTP form collection
along with the values of other controls.
Query Strings
Query Strings
A query string is information that is appended to the
end of a page URL. In order for query string values to
be available during page processing, you must
submit the page using an HTTP GET command.
Cookies
Cookies
A cookie is a small amount of data that is stored
either in a text file on the client file system or in-
memory in the client browser session.
Continue…….
It contains site-specific information that the server
sends to the client along with page output.
Cookies can be temporary (with specific expiration
times and dates) or persistent.
Advantages of using Client-Side state management
No server resources are required
Simple implementation
Enhanced security features
Reliability
Data persistence
Disadvantages of using cookies are:
 Performance considerations
 Size limitations: Most browsers place a 4096-byte
limit on the size of a cookie, although support for
8192-byte cookies is becoming more common in
newer browser and client-device versions.
 User-configured refusal
 Potential security risks

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentfawaz
 
Soa 11 representational state transfer rest
Soa 11 representational state transfer restSoa 11 representational state transfer rest
Soa 11 representational state transfer restVaibhav Khanna
 
Application enumeration and launch
Application enumeration and launchApplication enumeration and launch
Application enumeration and launchPraveen Bakka
 
Developing for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesDeveloping for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesHarish Ranganathan
 
SharePoint and Open XML
SharePoint and Open XMLSharePoint and Open XML
SharePoint and Open XMLBecky Bertram
 
The life cycle of dot net application
The life cycle of dot net applicationThe life cycle of dot net application
The life cycle of dot net applicationshwetashivankar17
 
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...Edureka!
 
Intoduction to web services
Intoduction to web servicesIntoduction to web services
Intoduction to web servicesAhmed Gamil
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Developmentzaidfarooqui974
 

Was ist angesagt? (16)

Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Web 2 0 Technologies
Web 2 0 TechnologiesWeb 2 0 Technologies
Web 2 0 Technologies
 
Soa 11 representational state transfer rest
Soa 11 representational state transfer restSoa 11 representational state transfer rest
Soa 11 representational state transfer rest
 
Application enumeration and launch
Application enumeration and launchApplication enumeration and launch
Application enumeration and launch
 
Developing for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesDeveloping for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data Services
 
Bdc Screens
Bdc ScreensBdc Screens
Bdc Screens
 
Web service
Web serviceWeb service
Web service
 
SharePoint and Open XML
SharePoint and Open XMLSharePoint and Open XML
SharePoint and Open XML
 
Ado
AdoAdo
Ado
 
The life cycle of dot net application
The life cycle of dot net applicationThe life cycle of dot net application
The life cycle of dot net application
 
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...
Top 10 Most Popular JavaScript Frameworks | Which JavaScript Framework to lea...
 
Intoduction to web services
Intoduction to web servicesIntoduction to web services
Intoduction to web services
 
Restful web services
Restful web servicesRestful web services
Restful web services
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Development
 
Logging service design
Logging service designLogging service design
Logging service design
 
Ajax
AjaxAjax
Ajax
 

Andere mochten auch (17)

Yaseen Imran
Yaseen ImranYaseen Imran
Yaseen Imran
 
IVT Företagspresentation
IVT FöretagspresentationIVT Företagspresentation
IVT Företagspresentation
 
BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-
 
Storyboard
StoryboardStoryboard
Storyboard
 
Some thoughts on 2 d 3-d information processing
Some thoughts on 2 d 3-d information processingSome thoughts on 2 d 3-d information processing
Some thoughts on 2 d 3-d information processing
 
University of Limerick Library supports first year student transition
University of Limerick Library supports first year student transition University of Limerick Library supports first year student transition
University of Limerick Library supports first year student transition
 
Qaulan syadida
Qaulan syadidaQaulan syadida
Qaulan syadida
 
Huong dan thiet ke mo phong
Huong dan thiet ke mo phongHuong dan thiet ke mo phong
Huong dan thiet ke mo phong
 
Question 4 technology
Question 4  technologyQuestion 4  technology
Question 4 technology
 
Illinois grandparent law right see grandchild
Illinois grandparent law right see grandchildIllinois grandparent law right see grandchild
Illinois grandparent law right see grandchild
 
Empowering staff and students to flourish in the digital age
Empowering staff and students to flourish in the digital ageEmpowering staff and students to flourish in the digital age
Empowering staff and students to flourish in the digital age
 
Foda Cv
Foda CvFoda Cv
Foda Cv
 
avinash
avinashavinash
avinash
 
Jdeme na to od lesa
Jdeme na to od lesaJdeme na to od lesa
Jdeme na to od lesa
 
Tolios
ToliosTolios
Tolios
 
IJISET_V2_I6_90
IJISET_V2_I6_90IJISET_V2_I6_90
IJISET_V2_I6_90
 
Genre Analysis
Genre AnalysisGenre Analysis
Genre Analysis
 

Ähnlich wie Session viii(state mngtclient)

Ähnlich wie Session viii(state mngtclient) (20)

State management
State managementState management
State management
 
05 asp.net session07
05 asp.net session0705 asp.net session07
05 asp.net session07
 
State management
State managementState management
State management
 
Session and state management
Session and state managementSession and state management
Session and state management
 
StateManagement in ASP.Net.ppt
StateManagement in ASP.Net.pptStateManagement in ASP.Net.ppt
StateManagement in ASP.Net.ppt
 
State management
State managementState management
State management
 
Esc 209 paper_doin
Esc 209 paper_doinEsc 209 paper_doin
Esc 209 paper_doin
 
WEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdfWEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdf
 
WEB MODULE 5.pdf
WEB MODULE 5.pdfWEB MODULE 5.pdf
WEB MODULE 5.pdf
 
Asp.net
Asp.netAsp.net
Asp.net
 
UNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptxUNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptx
 
CGI by rj
CGI by rjCGI by rj
CGI by rj
 
05 asp.net session07
05 asp.net session0705 asp.net session07
05 asp.net session07
 
State management
State managementState management
State management
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
 
Managing states
Managing statesManaging states
Managing states
 
Session viii(state mngtserver)
Session viii(state mngtserver)Session viii(state mngtserver)
Session viii(state mngtserver)
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
single page application
single page applicationsingle page application
single page application
 
05 asp.net session07
05 asp.net session0705 asp.net session07
05 asp.net session07
 

Mehr von Shrijan Tiwari

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)Shrijan Tiwari
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)Shrijan Tiwari
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)Shrijan Tiwari
 
Session iii(server controls)
Session iii(server controls)Session iii(server controls)
Session iii(server controls)Shrijan Tiwari
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)Shrijan Tiwari
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShrijan Tiwari
 

Mehr von Shrijan Tiwari (11)

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
 
Session ix(database)
Session ix(database)Session ix(database)
Session ix(database)
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)
 
Session iii(server controls)
Session iii(server controls)Session iii(server controls)
Session iii(server controls)
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 

Kürzlich hochgeladen

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Kürzlich hochgeladen (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Session viii(state mngtclient)

  • 2. In this session we will learn about ASP.NET state management overview Client –side state management Server-side state management
  • 3. state management overview HTTP ( Hyper Text Transfer Protocol) is a stateless protocol. When the client disconnects from the server, the ASP. Net engine discards the page objects. This way each web application can scale up to serve numerous requests simultaneously without running out of server memory.
  • 4. However, there need to be some technique to store the information between requests and to retrieve it when required. This information i.e., the current value of all the controls and variables for the current user in the current session is called the State.
  • 5. ASP.NET State Management  In a Web programming, this would typically mean that all information associated with the page and the controls on the page would be lost with each round trip. To overcome this inherent limitation of traditional Web programming,
  • 6. Continue……. ASP.NET includes several options that help you preserve data on both a per-page basis and an application-wide basis. We can secure data at both side: Serer side and Client side using  Client Side State Management  Server side State Management
  • 7. Storing page information using client-side options doesn't use server resources. These options typically have minimal security but fast server performance because the demand on server resources is modest. Client-Based State Management
  • 8. Continue……. The following are the client-side state management options that ASP.NET supports:  View state  Hidden fields  Cookies  Query strings
  • 9. View State View State  The View State property provides a dictionary object for retaining values between multiple requests for the same page.  This is the default method that the page uses to preserve page and control property values between round trips.
  • 10. Continue…….  When the page is processed, the current state of the page and controls is hashed into a string and saved in the page as a hidden field.  When the page is posted back to the server, the page parses the view-state string at page initialization and restores property information in the page.
  • 11. Hidden Fields Hidden Fields ASP.NET allows you to store information in a Hidden Field control, which renders as a standard HTML hidden field. When a page is submitted to the server, the content of a hidden field is sent in the HTTP form collection along with the values of other controls.
  • 12. Query Strings Query Strings A query string is information that is appended to the end of a page URL. In order for query string values to be available during page processing, you must submit the page using an HTTP GET command.
  • 13. Cookies Cookies A cookie is a small amount of data that is stored either in a text file on the client file system or in- memory in the client browser session.
  • 14. Continue……. It contains site-specific information that the server sends to the client along with page output. Cookies can be temporary (with specific expiration times and dates) or persistent.
  • 15. Advantages of using Client-Side state management No server resources are required Simple implementation Enhanced security features Reliability Data persistence
  • 16. Disadvantages of using cookies are:  Performance considerations  Size limitations: Most browsers place a 4096-byte limit on the size of a cookie, although support for 8192-byte cookies is becoming more common in newer browser and client-device versions.  User-configured refusal  Potential security risks