public static string Decrypt(string id, out bool isAuthorize) { try { CommonMethodsDAL Commondal = new CommonMethodsDAL(); string decryptedEmployeeId = string.Empty; decryptedEmployeeId = Commondal.Decrypt(Convert.ToString(id), true); decryptedEmployeeId = decryptedEmployeeId.Replace(HttpContext.Current.Session["SecurityKey"].ToString(), ""); isAuthorize = true; return(decryptedEmployeeId); } catch (System.Exception ex) { isAuthorize = false; return(string.Empty); } }