Home
ASP.Net
Interview FAQs

a) Keep values between postbacks without storing them in session state or in a user profile.
b) Store the values of page or control properties that you define.
c) Create a custom view state provider that lets you store view state information in a SQL Server database or in another data store.

No server resources are required : The view state is contained in a structure within the page code.

Simple implementation : View state does not require any custom programming to use. It is on by default to maintain state data on controls.
Enhanced security features : The values in view state are hashed, compressed, and encoded for Unicode implementations, which provides more security than using hidden fields.

Limitations:

  • Because view state is stored in the page, it results in a larger total page size.
  • ASP.NET uses view state only with page and control properties.
  • View state is not a good place to store sensitive information that the client should not be allowed to see. click on the below link to keep continue for same type of questions with answers.

View state is used automatically by the ASP.NET page framework to persist information that must be preserved between postbacks.

ASP.NET Web handler files have an .ashx file extension. Web handlers work just like .aspx files except you do not have to deal with the browser interface, thus no worrying about presentation. Web handlers are generally used to generate content dynamically like returning XML or an image. Web handlers use the IHttpHandler interface with the ProcessRequest() method invoked when the handler is requested. Web handlers are simpler than pages (fewer events and wiring), so they are ideal for performance-critical applications.

An object pool is a container of objects that holds a list of other objects that are ready to be used.

It keeps track of:

  • Objects that are currently in use
  • The number of objects the pool holds
  • Whether this number should be increased

The request for the creation of an object is served by allocating an object from the pool.This reduces the overhead of creating and re-creating objects each time an object creation is required.It is a list of ready to use objects. Whenever a new request comes in for creating an object, then the application is served from this pool. This reduces the overhead of creating an object over and over again.

Scope refers to the region of code in which a variable may be accessed.
ADO.NET is the new database technology of the .NET (Dot Net) platform, and it builds on Microsoft ActiveX® Data Objects (ADO). ADO is a language-neutral object model that is the keystone of Microsofts Universal Data Access strategy. ADO.NET is an integral part of the .NET Compact Framework, providing access to relational data, XML documents, and application data. ADO.NET supports a variety of development needs. You can create database-client applications and middle-tier business objects used by applications, tools, languages or Internet browsers.

  • When two or more users retrieve the data in the same row of a database table at the same time, it is called concurrency. BecauseADO.NET uses a disconnected data architecture, the database management system can not prevent this from happening.
  • If two users try to update the same row in a database table at the same time, the second users changes could overwrite the changes made by the first user. Whether or not that happens depends on the concurrency control that the programs use.
  • By default, ADO.NET uses optimistic concurrency. This means that the program checks to sec whether the database row that is going to be updated or deleted has been changed since it was retrieved. If it has, a concurrency exception occurs and the update or deletion is refused. Then, the program should handle the exception.
  • If optimistic concurrency is not in effect, the program does not check to see whether a row has been changed before an update or deletion takes place. Instead, the operation proceeds without throwing an exception. This is referred to as "last in wins" because the last update overwrites any previous update. And this can lead to errors in the database.

  • For many applications, concurrency errors rarely occur. As a result, optimistic concurrency is adequate because the users will rarely have to resubmit an update or deletion that is refused.
  • If concurrency is likely to be a problem, a program that uses a dataset can be designed so it updates the database and refreshes the dataset frequently. That way, concurrency errors are less likely to occur.
  • Another way to avoid concurrency errors is to design a program so it retrieves and updates just one row at a time. That way, there is less chance that two users will retrieve and update the same row at the same time.

PreviousDisplaying 45 of 46Next
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*