您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 个人博客系统
  所属分类: Web开发
  开发工具:
  文件大小: 1mb
  下载次数: 0
  上传时间: 2012-05-20
  提 供 者: m9405*****
 详细说明: using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class article_edit : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { banddata(); } } public void banddata() { //绑定页面数据,分两种一情况,分别为新增,修改,分开对待 Artic le o_article = new Article(); string ftypeid = ""; //request["fid"]非空时,表示当前操作为修改操作,此时,对页面进行填充 if (Request["fid"] != null) { o_article=o_article.get(Request["fid"].ToString()); txttitle.Text = o_article.ftitle; ftypeid = o_article.ftype; txtjj.Text = o_article.fremark; txtsource.Text = o_article.fsource; txtcontent.Text = o_article.fcontent; } o_article.bandarticletype(droptype, ""); } protected void btnsave_Click(object sender, EventArgs e) { if (txttitle.Text == ""||txttitle.Text.Length>20) { showmsg("文章标题不能为空或者长度超长(最长不超过20个字)!"); return; } if (txtjj.Text == ""||txtjj.Text.Length>100) { showmsg("文章简介不能为空或者长度超长(最长不超过100字)!"); return; } if (txtcontent.Text == "") { showmsg("文章内容不能为空!"); return; } Article o_article=new Article(); o_article.ftitle=txttitle.Text; o_article.ftype=droptype.SelectedValue; o_article.fremark=txtjj.Text; o_article.fsource=txtsource.Text; o_article.fcontent=txtcontent.Text; bool result=false; if (Request["fid"]==null) { result=o_article.Add(o_article); } else{ result=o_article.update(o_article,Request["fid"].ToString()); } if (result) { showmsg("文章信息保存成功!"); } if (Request["fid"]==null) { txttitle.Text=""; droptype.SelectedIndex=0; txtjj.Text=""; txtsource.Text=""; txtcontent.Text=""; } } public void showmsg(string msgstr) { Response.Write("[removed]"); Response.Write("alert('" + msgstr + "')"); Response.Write("[removed]"); } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 个人博客系统
 输入关键字,在本站1000多万海量源码库中尽情搜索: