Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //  string connstr = DecryptText(System.Configuration.ConfigurationManager.ConnectionStrings[ConfigurationSettings.AppSettings["APPID"].ToString()].ToString(), "SilverAmreli");



            objMenuSchema.MenuName = "Home";
            ds = objMenuBL.GetMenuDetails(objMenuSchema);

            if (ds.Tables[0].Rows.Count > 0)
            {
                String strHomePageLink = HttpUtility.UrlDecode(Request.Url.OriginalString).Replace(HttpUtility.UrlDecode(Request.Url.PathAndQuery), string.Empty) + "/" + Convert.ToString(ds.Tables[0].Rows[0]["MenuID"]) + "/";
                strHomePageLink += Convert.ToString(ds.Tables[0].Rows[0]["MenuName"]).TrimStart().TrimEnd().Replace(" ", "-");
                Response.Redirect(HttpUtility.UrlDecode(strHomePageLink, System.Text.Encoding.UTF8));
            }
            else
            {
                Response.Redirect("~/Site/Home/Index.aspx");
            }
        }