public void MyBind() { NodeDPBind(); if (!string.IsNullOrEmpty(Url))//普通页面,新浪等 { string html = htmlHelper.GetHtmlFromSite(Url); Content_T.Text = acBll.GetArticleFromWeb(html, Url); Title_T.Text = Request["Title"] == null?htmlHelper.GetTitle(html) : Request["Title"]; SourceUrl_T.Text = Request["Source"] == null?GetSource(Url) : Request["Source"]; Author_T.Text = Request["Author"] == null?badmin.GetAdminLogin().AdminName : Request["Author"]; Synopsis_T.Text = DateTime.Now.ToString(); } else if (!string.IsNullOrEmpty(Request.Form["cms_json_hid"]))//页面下载,视频下载等 { JObject json = (JObject)JsonConvert.DeserializeObject(Request.Form["cms_json_hid"]); switch (json["action"].ToString()) { case "downpage": if (json["url"] == null || string.IsNullOrEmpty(json["url"].ToString())) { return; } string title = json["title"].ToString(); title = string.IsNullOrEmpty(title) ? "无标题.mht" : SafeC.RemovePathChar(title + ".mht"); string vpath = "/Temp/DownPage/" + title; if (!Directory.Exists(Server.MapPath("/Temp/DownPage/"))) { Directory.CreateDirectory(Server.MapPath("/Temp/DownPage/")); } vpath = htmlHelper.DownToMHT(json["url"].ToString(), vpath); SafeSC.DownFile(vpath); SafeSC.DelFile(vpath); Response.End(); break; case "video": Title_T.Text = json["title"].ToString(); SourceUrl_T.Text = GetSource(json["url"].ToString()); Content_T.Text = json["content"].ToString(); break; } } }