.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

What are the disadvantages of viewstate/what are the benefits?

Posted By :nishithraj     Posted Date :December 28, 2009    Points :10   Category :ASP.Net 
Disadvantages
1)Performance can be reduced. becuse the viewstate is stored in the page itself, storing large values can cause the page to slowdown.It can carry only up to 10 KB of data very easily without causing any degraded perfomance.
2) As view state is stored in a hidden field on the page although it stores data in a hashed base64 encoded format, it can be tampered.

Advantages :
1) No server resources are required
2) simple Implementation
3) Automatic retention of page & view state

You can also find related Interview Question to What are the disadvantages of viewstate/what are the benefits?  below: 

What are the advantages and disadvantages of viewstate?

  
The primary advantages of the ViewState feature in ASP.NET are:
1. Simplicity. There is no need to write possibly complex code to store form data between page submissions.
2. Flexibility. It is possible to enable, configure, and disable ViewState on a control-by-control basis, choosing to persist the values of some fields but not others.
There are, however a few disadvantages that are worth pointing out:
1. Does not track across pages. ViewState information does not automatically transfer from page to page. With the session
approach, values can be stored in the session and accessed from other pages. This is not possible with ViewState, so storing
data into the session must be done explicitly.
2. ViewState is not suitable for transferring data for back-end systems. That is, data still has to be transferred to the back
end using some form of data object
(More...)

What is the difference between ViewState and SessionState?

  
ViewState persist the values of controls of particular page in the client when post back operation done. When user requests another page previous page data no longer available.

SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes. (More...)

What are the disadvantages of AJAX?

  
The disadvantages are:
a)Ajax is not so friendly with search engine indexing because it uses Javascript for much part of its code. Search engines generally do not index Javascript present in web pages.
b)Dynamically created pages created by ajax does not support back button which takes the user to the previous pages. (More...)

What Is The Difference Between ViewState and SessionState?

  
View State persist the values of controls of particular page in the client (browser) when post back operation done. When user requests another page previous page data no longer available.
SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes. (More...)

What are the Benifits of Using ViewState?

  
a).No server resources are required because state is in a structure in the page code.
b).Simplicity.
c).States are retained automatically.
d).The values in view state are hashed, compressed, and encoded, thus representing
e).A higher state of security than hidden fields.
f).View state is good for caching data in Web frame configurations because thedata is cached on the client. (More...)

What are the main benefits of Office SharePoint Server 2007?

  
Office SharePoint Server 2007 provides a single integrated platform to manage intranet, extranet,and Internet applications across the enterprise.

* Business users gain greater control over the storage, security, distribution, and management of their electronic content, with tools that are easy to use and tightly integrated into familiar,everyday applications.

* Organizations can accelerate shared business processes with customers and partners across organizational boundaries using InfoPath Forms Services-driven solutions.

* Information workers can find information and people efficiently and easily through the-facilitated information-sharing functionality and simplified content publishing. In addition, access to back-end data is achieved easily through a browser, and views into this data can be personalized.

* Administrators have powerful tools at their fingertips that ease deployment, management, and system administration, so they can spend more time on strategic tasks.

* Developers have a rich platform to build a new class of applications, called Office Business Applications, that combine powerful developer functionality with the flexibility and ease of deployment of Office SharePoint Server 2007. Through the use of out-of-the-box application services, developers can build richer applications with less code. (More...)

When during the page processing cycle is ViewState available?

  
After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

Does ViewState is responsible for maintaining data across the Page Post Back for Postback controls (like textbox, dropdownlist) and non-postbackcontrols(like label)?

  
It is false. For NonPostback controls it is true but for postback controls, ASP.NET retrieves their values one by one from the HTTP request and copies them to the control values while creating the HTTP response. (More...)

When during the page processing cycle is ViewState available?

  
The view state is available after the Init() and before the Render() methods are called during Page load. (More...)

When during the page processing cycle is ViewState available?

  
After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

What is the lifespan for items stored in ViewState?

  
Item stored in ViewState exist for the life of the current page. This includes postbacks. Viewstate become nothing once it redirects or transfer to another page. (More...)

How many ViewState objects can be created on an aspx page ?

  
There is no limit. You can have any number of ViewState object on single aspx page. However more Viewstate objects, more slowly it loads. (More...)

What is the lifespan for items stored in viewstate

  
Item stored in ViewState exist for the life of the current
page. This includes postbacks (to the same page). (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend