protected void Page_Load(object sender, EventArgs e) { CKEditorControl1.Language = CultureInfo.CurrentCulture.ToString(); string path = Server.MapPath("~/App_Data/notepad/"); FileHelpers.CreateDirectory(path); _filename = path + "notepad.html"; FileHelpers.CreateFile(_filename); }
public void SaveRobots() { try { FileHelpers.CreateFile(_filename); using (var wr = new StreamWriter(_filename)) { wr.Write(txtRobots.Text); } } catch (Exception ex) { Debug.LogError(ex); } }
protected void Page_PreRender(object sender, EventArgs e) { try { FileHelpers.CreateFile(_filename); using (var sr = new StreamReader(_filename)) { //String line = sr.ReadToEnd(); txtRobots.Text = sr.ReadToEnd(); } } catch (Exception ex) { Debug.LogError(ex); } }
protected void SetNotepad(string text) { try { Message.Visible = false; FileHelpers.CreateFile(_filename); using (var wr = new StreamWriter(_filename)) { wr.Write(text); Message.Text = Resources.Resource.Admin_Notepad_SaveComplete; Message.Visible = true; } } catch (Exception e) { Debug.LogError(e); Message.Text = Resources.Resource.Admin_Notepad_SaveError; Message.Visible = true; } }
protected string GetNotepad() { try { Message.Visible = false; FileHelpers.CreateFile(_filename); using (var sr = new StreamReader(_filename)) { String line = sr.ReadToEnd(); return(line); } } catch (Exception e) { Debug.LogError(e); Message.Text = Resources.Resource.Admin_Notepad_LoadError; Message.Visible = true; return(string.Empty); } }
protected void GoShopClick(object sender, EventArgs e) { FileHelpers.CreateFile(SettingsGeneral.InstallFilePath); Response.Redirect("~/"); }
protected void Page_Load(object sender, EventArgs e) { _filename = Server.MapPath("~/") + "robots.txt"; FileHelpers.CreateFile(_filename); }