protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refCommon.EkMsgRef; AppImgPath = m_refCommon.AppImgPath; AppPath = m_refCommon.AppPath; m_strPageAction = Request.QueryString["action"]; Utilities.SetLanguage(m_refCommon); MenuLanguage = m_refCommon.ContentLanguage; MenuId = Convert.ToInt64(Request.QueryString["menuid"]); if (Request.QueryString["view"] != null) { m_strViewItem = Request.QueryString["view"]; } if (!string.IsNullOrEmpty( Request.QueryString["folderid"])) { FoldId = long.Parse(Request.QueryString["folderid"].ToString()); } m_refContent = m_refCommon.EkContentRef; m_refContentApi = new ContentAPI(); Utilities.SetLanguage(m_refContentApi); m_strBackPage = Request.QueryString.ToString(); // strip off refresh indicator if (m_strBackPage.EndsWith("&rf=1")) { // refresh is needed after we edit a submenu, but we don't want to keep refreshing if we use the same URL m_strBackPage = m_strBackPage.Substring(0, m_strBackPage.Length - 5); } reloadTree = (Request.QueryString["rf"] != null && Request.QueryString["rf"] == "1"); if (IsPostBack == false) { DisplayPage(); RegisterResources(); } else { if (Request.Form[submittedaction.Name] == "deleteitem") { // handle deleting menu items string contentids = Request.Form[frm_item_ids.Name]; Server.Transfer((string)("collections.aspx?action=doDeleteMenuItem&folderid=" + MenuId + "&nid=" + MenuId + "&ids=" + contentids + "&back=" + EkFunctions.UrlEncode(Request.Url.ToString())), true); } else if (Request.Form[submittedaction.Name] == "delete") { // handle deleting the menu AxMenuData menu; menu = m_refContent.GetMenuDataByID(MenuId); if (FoldId == 0) reloadTree = true; if (reloadTree) { Server.Transfer((string)("collections.aspx?action=doDeleteMenu&reloadtrees=menu&nid=" + MenuId + "&back=" + EkFunctions.UrlEncode((string)("menu.aspx?action=deleted&title=" + menu.Title))), true); } else { Server.Transfer((string)("collections.aspx?action=doDeleteMenu&folderid=" + FoldId + "&nid=" + MenuId + "&back=" + EkFunctions.UrlEncode((string)("menu.aspx?action=deleted&title=" + menu.Title))), true); } } } isPostData.Value = "true"; }