hello,
i want to Check session is null or empty on page load.
Thanx in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Munesh SharmaRank #174 · 13.9K reputationPosted Oct 13, 2014, 1:53 AM EDT
Abhishek KumarRank #510 · 4.8K reputationPosted Oct 13, 2014, 3:22 AM EDT
Please check like this.
if (!string.IsNullOrEmpty(Session["UserID"] as string))
{
//Code
}
Hope this will help , let me know if any issues.
Abhishek