try {
if (HttpContext.Current.Session["UserID"]!=null){ // Program error occurs here. // TO DO STH... }
if (HttpContext.Current.Session["UserID"]!=null){ // Program error occurs here.
// TO DO STH...
}
} catch { } // Not logged in does not make.