public void check() { try { clsCommon obj = new clsCommon(); int level = Convert.ToInt32(Session["level"]); if (obj.CheckUserRight("FundTransferAccept", level) == 0) { string prevPage = Request.UrlReferrer.ToString(); ViewState["prevform"] = prevPage; ViewState["action"] = "check"; okmessage("Tsunami ARMS - Warning", "You are not authorized to access this page"); this.ScriptManager1.SetFocus(btnOk); } } catch { Response.Redirect("~/Login frame.aspx"); } finally { con.Close(); } }