.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

State Management in ASP.NET

Posted By :Krishna     Posted Date :April 12, 2012    Points :40   Category :ASP.Net 
State Management
Type of state management in ASP.NET
1.InProc(Where session objects stored wit in IIS server)
2.OutProc(Where session objects store out of the server
a.State Server(where session objects can store in different server)
b.SQL server(where session objects can store in SQL server)

This can be configure in web.config file .

You can also find related Interview Question to State Management in ASP.NET  below: 

how to pass the values across webforms without using State Management Concepts:

  
Page1.aspx.cs

public String CurrentCity
{
get
{
return TextBox1.Text;
}
}


In Page2.aspx

<%@ PreviousPageType VirtualPath="~/Page1.aspx" %>

Label1.Text=PreviousPage.CurrentCity;


Another Method:

In Page2.aspx

TextBox SourceTextBox = (TextBox)PreviousPage.FindControl("TextBox1");

Label1.Text = SourceTextBox.Text;




(More...)

What is Profile Based State in ASP State Management ?

  
A profile based state is nothing but the state changes is saved permanently for a particular profile. That means the state is saved manually by the user. If there was no saving done the Default settings will be applied .


For Example .
If we login into igoogle.com, there if we have our customized page set once, untill and unless we change it delibrately it will be the same page. (More...)

What are the different state management techniques used in asp.net for web applications?

  
In ASP.Net the state can be maintained in following ways
Server-side state management
Application objects
Session Variables
Database
Client-side state management
Cookies
Hidden input fields
Query String
ViewState (More...)

what are the different state management techniques in ASP.Net?

  
Asp.Net state management can be maintained in two ways as below
Client- Side State Management
ASP.Net provides following techniques to store state information. This will improve application performance by minimizing server resource utilization
1.View state
2. Hidden Fields
3. Cookies
4. Query Strings
Server - Side State Management
With respect to Server Side State Management ASP.Net uses "Application state" and "Session state" objects to store data or user state.

Read more: asp.net interview questions and answers | Introduction | FreeJobAlert.com http://www.freejobalert.com/explain-the-advantages- (More...)

What are the client-side state management technique supported by ASP.NET?

  
Control state

View state

Cookies

Hidden fields

Query strings (More...)

Session state vs View state

  
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 (More...)

What is Automatic Memory Management in ASP.NET?

  
Automatic Memory Management: From a programmer's perspective, this is probably the single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in my long career of DOS and Windows development has suffered at some point from memory management issues. Proper memory management is hard. Even very good programmers have difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process.

Programmers understand that they're responsible for releasing any memory that they allocate, but they're not very good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It's nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough.

The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today's processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles--it's incredibly efficient.
The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming environments.
On balance, automatic memory management is a huge win in almost every situation. (More...)

Which typically consumes more memory: application state or session state?

  
Session state tends to use much more memory than application state, because copies of all variables are stored for each user. (More...)

Which might not work if a user has disabled cookies in his or her Web browser: application state or session state?

  
Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies. (More...)

What is View State Chunking?

  
View state chunking is new in ASP.NET, version 2.0.The ViewState property retains values between multiple requests for the same page. When an ASP.NET 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. If the data is too long for a single field (as specified in the MaxPageStateField-Length property), then ASP.NET performs view state chunking to split it across multiple hidden fields. (More...)

Is view state lost if a user refreshes a Web page? What if the user copies the URL and open it in other browser?

  
View state is maintained within a page's HTML, so it is lost if a page is refreshed or if the URL is copied. (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