SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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
 

What's hot (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
 

Viewers also liked (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
 

Similar to Session viii(state mngtclient)

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%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 Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 

Recently uploaded (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%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 Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 

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