Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
Is it possible to share session information among ASP and ASPX page?
Posted By :
Posted Date :
December 07, 2009
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?
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.
can we use session variable in App_code Class page ?
By using "HttpContext.Current.Session("VarName") ", we can use current session variable in App_code Class page
Techunique Solutions is designing a website for a Goodways travels. One of the requirements given to the design team is that the website should handle the requirements of the employees of Techunique, travel agents and direct customers separately. Apart from that, the website should give information related to the new holiday packages announced by Goodways. The design team has decided to create separate interfaces for these three types of users. Peter Williams, one of the members of the design team, has been given the task to identify the home page strategy for the website. Which of the following home page strategies should Peter select for the travel website?
1, Splash home page
2, Menu home page
3, Path-based home page
4, News-oriented home page
Answer : 3
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".
i have 3 aspx pages: page1.aspx, page2.aspx, page3.aspx. i have one Database table Employee (Empname, Age, EmpId, mobile, Country) with 1000 records inserted. now i want to retrieve the records in page1.aspx only once and i should use this data between the 3 pages without using Session variable. How to achieve this ?
need help on this question
i have one aspx page. Only one text box i have in that page. i have retived the records from the Database. now i want to assign the value to the text box with out writing the code in aspx.cs textbox.text = . But value has to be assigned to that text box. how to achieve this ?
how to achieve this ?
What is the difference between ViewState,Application and Session of a Page?
- 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 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)
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)
- 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
Session state provides more security when compared with view state as the data value is stored in server side
What property do you have to set to tell the grid which page to go to when using?
Datgrid's CurrentPageIndex Property
What is the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?
CodeBehind is relevant to Visual Studio.NET only.
Which system tables contain information on privileges granted and privileges obtained?
Which system table contains information on constraints on all the tables created?
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
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.
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.
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
Quick Links For Interview Questions Categories:
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
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
Terms of Service
Tell A Friend