C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
Session state vs. View state:
19y
10.2k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
View State: View state, which persists values in a page. View state is maintained in page level only. View state of one page is not visible in another page. View state information stored in client only. View state persist the values of particular page in the client (browser) when post back operation done. View state used to persist page-instance-specific data. (Read more) Session State: Session state is maintained in session level. Session state value is available in all pages within a user session. Session state information stored in server. Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.
shankar kumar
11y
1
In some cases, using view state is not feasible. The alternative for view state is session state. Session state is employed under the following situations: Large amounts of data - View state tends to increase the size of both the HTML page sent to the browser and the size of form posted back. Hence session state is used. Secure data - Though the view state data is encoded and may be encrypted, it is better and secure if no sensitive data is sent to the client. Thus, session state is a more secure option. Problems in serializing of objects into view state - View state is efficient for a small set of data. Other types like DataSet are slower and can generate a very large view state.
19y
0
What are data objects in SQL server?
What are VSDISCO files?
Message