.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 >> .NET Framework >> Post New Question Subscribe to Interview Questions

Is it possible to share session information among ASP and ASPX page?

Posted By :Shashi Ray     Posted Date :December 07, 2009    Points :10   Category :.NET Framework 
No,it is not possible as both of these are running under different processes.

You can also find related Interview Question to Is it possible to share session information among ASP and ASPX page?  below: 

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

can we use session variable in App_code Class page ?

  
Yes.
By using "HttpContext.Current.Session("VarName") ", we can use current session variable in App_code Class page (More...)

What does the EnableViewStateMac setting in an aspx page do?

  
EnableViewStateMac setting is a security measure in ASP.Net. It ensures the view state for a page not to tamper. To to so " EnableViewStateMac=true "is used. ASP.net detects the change in the value of view state sent to the browser when Postback action takes place and raises an error - "Validation of view state MAC failed". (More...)

What is the difference between ViewState,Application and Session of a Page?

  
View State:

- 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.
- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)


Usage

- If you want to access the information on different web pages, you can use SessionState
- If you want to access from the same page, then you can use Viewstate
-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side (More...)

Explain the life cycle of an ASP .NET page.

  
Life cycle of ASP.Net Web Form
Page Request >> Start >> Page Init >> Page Load >> Validation >>
PostBack Event Handling >> Page Rendering >> Page Unload
Page Request - When the page is requested ASP.Net determines
whether the page is to be parsed and compiled or a cached verion
of the page is to be sent without running the page.
Start - Page propertied REQUEST and RESPONSE are SET, if the
page is pastback request then the IsPostBack property is SET and
in addition to this UICulture property is also SET.
Page Initilization - In this the UniqueID of each property is SET.
If the request was postback the data is not yet loaded from the
viewstate.
Page Load - If it was a postback request then the data gets loaded
in the control from the ViewState and control property are set.
Validation - If any control validation present, they are performed
and IsValid property is SET for each control.
PostBack Event Handling - If it was a postback request then any
event handlers are called.
Page Rendering - Before this the viewstate is saved from the page
and RENDER method of each page is called.
Page Unload - Page is fully rendered and sent to the client(Browser)
and is discarded. Page property RESPONSE and REQUEST are unloaded. (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...)

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