protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request["id"] ?? "0");
            HKSJ_Main bllMain = new HKSJ_Main();
            if (!IsPostBack)
            {
                modelMain=bllMain.GetModel(id) ;
            }
            else
            {
                //新闻并不是全部都修改,所以先有原来的新闻信息,再修改其部分,最后保存

                //本来以为在第二次的modelMain里面保留了上次的记录,那么直接修改这个对象,再保存,然而事实是这个对象并未保存,第二次访问时为null
                //Response.Clear();
                //Response.Write(modelMain.title);
                //Response.End();

                //必须查询一次数据库,把这调新闻查询出来,在修改,再保存
                News.Model.HKSJ_Main saveModel = bllMain.GetModel(id);
                saveModel.people = Request["people"];
                saveModel.type = Request["type"];
                saveModel.title = Request["title"];
                saveModel.content = Request["content"];
                bllMain.Update(saveModel);

                Response.Clear();
                Response.Write("ok");
                Response.End();
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            int id = int.Parse(context.Request["id"] ?? "0");
            HKSJ_Main bllMain = new HKSJ_Main();
            News.Model.HKSJ_Main modelMain = bllMain.GetModel(id);

            System.Web.Script.Serialization.JavaScriptSerializer jsScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            context.Response.Write(jsScriptSerializer.Serialize(modelMain));
        }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            HKSJ_Main bllMain=new HKSJ_Main();
            int id = int.Parse(context.Request["Id"]);
            News.Model.HKSJ_Main modelMain = bllMain.GetModel(id);
            modelMain.title = context.Request["txtTitle"];
            modelMain.type = context.Request["txtType"];

            bllMain.Update(modelMain);
            context.Response.Write("ok");
        }