.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

Where to Use Session object?

Posted By :Syed Shakeer Hussain     Posted Date :October 27, 2010    Points :10   Category :ASP.Net 
1) When you want to pass value/object to another page you can use this session object.

2) When you want to save (temporary) some data for that particular user , you can use this session object. Eg., Passing login information of the user from one page to another


You can also find related Interview Question to Where to Use Session object?  below: 

How to update and retrieve value from a session state object?

  
To add or update a session state item use the following syntax,
[CODE]Session["Item Name"]= value;[/CODE]
Ex:- [CODE]Session["Name"]= Abhisek;[/CODE]
You can also pass a variable.

To to retrieve a session state items value use following ,
[CODE]String name=Session["Name"].ToString();[/CODE]
You can also retrieve to other formats according the session state item's data. (More...)

What do you mean by SESSION and APPLICATION object in asp.net?

  
Session object store information between HTTP requests for a individual user and application object are global across all users. (More...)

What do ypu mean by SESSION and APPLICATION object ?

  
Session object store information between HTTP requests for a particular user, while application object are global across users. (More...)

What is a Null object?

  
It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an object. (More...)

What is Object Oriented model?

  
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes. (More...)

Differences between application and session.

  
The session object maintains state on a per client basis whereas the application object is on a per application basis and is consistent across all client requests. (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 different between session and application

  
session is a object that store information between http request for a paticular user.
->But application object are global for each user (More...)

How can I look up a parent class method or property of any System-level object?

  
Use the Class View window, accessed from the standard toolbar by clicking View | Class View. (More...)

What is object Reference Tracing?

  
Object Reference Tracing is record sequential stack traces each time whenever object reference counter is incremented or decremented. These traces help to detect object reference errors, double-dereferencing, failure to reference. (More...)

How to remove a Session variable?

  
using HttpSessionState.Remove(); (More...)

How do you explicitly kill a user session?

  
To kill Session you have to use Session.Abandon() with this method we can explicitly kill a user session. (More...)

Is the session Timeout attribute a sliding timeout value?

  
The session Timeout is a sliding expiration time, meaning whever your page access session state, the expiration time will be moved forward. Please note that as long as a page has NOT disabled session state, it will access the session automatically when requested.


Regards
Santosh
http://santoshdotnetarena.blogspot.com/ (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