What is the equivalent of date() and time() in ASP.NET
VB.NET System.DateTime.Now.ToShortDateString() System.DateTime.Now.ToShortTimeString() C# System.DateTime.Now.ToShortDateString(); System.DateTime.Now.ToShortTimeString();
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.