Exemplo n.º 1
0
        protected void SaveButton_Click(object sender, EventArgs e)
        {
            Templator tp = new Templator();

            tp.Input         = TemplateContentTextBox.Value;
            tp.IsSubTemplate = IsSubTemplate;

            tp.FromVisualBoxText();
            tp.BodyText    = BodyText;
            tp.HeadContent = HeaderTextBox.Text;
            tp.FileName    = Server.MapPath(FileName);
            tp.Save();

            Messages.ShowMessage("" + InfoKey + "文件成功保存!" + DateTime.Now.ToLongTimeString());

            //记录日志
            string content = string.Format("编辑{0}的内容", NameLabel.Text.Replace("编辑" + InfoKey + "", ""));

            AddLog("编辑" + InfoKey + "内容", content);
        }