Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Name"] == null)
     {
         Response.Redirect("Index.html");
     }
     model.Name  = Session["Name"].ToString();
     chineseName = bll.GetChineseName(model.Name);
     GetArticlesList();
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Name"] == null)
            {
                Response.Redirect("Index.html");
            }
            model.Name  = Session["Name"].ToString();
            chineseName = bll.GetChineseName(model.Name);

            if (!IsPostBack)
            {
                if (Request.QueryString["Id"] != null)
                {
                    btnInsert.Text = "修改";
                    int id = Convert.ToInt32(Request.QueryString["id"]);
                    articlesModel = articlesBll.SelectById(id);
                    Title.Text    = articlesModel.Title;
                    Editor.Value  = Server.HtmlDecode(articlesModel.ContentHtml);
                }
            }
        }