protected void NewPage_Click(object sender, EventArgs e) { Util util = new Util(); Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID]; if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return; try { ClearMessages(); if (SavedCanvasHtml.Text.Length > 0) { if (!SavePage()) return; } string next_page = PageName.Text.Trim().Replace(" ", "_"); PageName.Text = ""; if (!CheckPageName(CurrentApp.SelectedValue, next_page)) { return; } AppPages.SelectedValue = next_page; State["SelectedAppPage"] = next_page; PageName.Text = State["SelectedAppPage"].ToString(); XmlUtil x_util = new XmlUtil(); AppPages.Items.Add(new RadComboBoxItem(next_page, next_page)); AppPages.SelectedIndex = AppPages.Items.Count - 1; x_util.SaveAppPage(State, next_page, ""); x_util.EncodeAppPageToAppXml(State, next_page, ""); InitPage(); } catch (Exception ex) { util.LogError(State, ex); Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace; } }