I am running the query SQL=’Select name from profile where proID=1′; and I am getting the result in Dataset dsdata. Now how do I read the text from the dataset and assign it to textbox1.text ?
VB.NET dsData.Tables(0).Rows(0)(‘FieldName’).ToString() C# dsData.Tables[0].Rows[0][‘FieldName’].ToString()
Response.Redirect and Server.Transfer is not working in Session_End
Session_End is fired internally by the server, based on an internal timer. And thus there is no HttpRequest associted when that happens. That is why Response.Redirect or Server.Transfer does not make sense and will not work.
What is the difference between Session.Abandon() and Session.Clear()?
The major difference is that if you call Session.Abandon(), Session_End will be fired (for InProc mode), and in the next request, Session_Start will be fired. Session.Clear( ) just clears the session data without killing it.
Can I share session state between web applications (i.e. ‘virtual directories’ or ‘applications’ in IIS)?
No.
Why isn’t session state available?
– First, check your web.config, machine.config and your page directive to make sure you have enabled session state. Reference: Session State @ Page – session state is not available just everywhere, anytime. It is available only after the HttpApplication.AcquireRequestState event is called. For example, it is NOT available in the Application_OnAuthenticateRequest handler inside global.asax. For details, see: Handling Public Events – Lastly, make sure System.Web.SessionState.SessionStateModule is included the in your config files. A common case is that SharePoint application will remove this module from their web.config files (for performance reason), and thus session state isn’t available.