温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:单用户Blog程序源码(VS2008)
当前文件:
SingleBlog/bob5_admin/pop.aspx.cs,打开代码结构图
SingleBlog/bob5_admin/pop.aspx.cs,打开代码结构图1using System; 2
using System.Web.UI; 3
4
public partial class bob5_admin_pop : System.Web.UI.Page 5
{ 6
protected void Page_Load(object sender, EventArgs e) 7
{ 8
this.Title = Title + SetTitle.getTitle(); 9
if (Convert.ToString(Session["admin"]) == "admin") 10
{ 11
int pid; 12
try 13
{ 14
pid = Convert.ToInt32(Request.QueryString["p"]); 15
} 16
catch 17
{ 18
Response.Redirect("~/refresh.aspx?msg=" + "对不起,请选中要回复的留言"); 19
} 20
} 21
else 22
{ 23
Response.Redirect("~/refresh.aspx?msg=" + "对不起,只有管理员才能对文章进行相关的操作!"); 24
} 25
26
} 27
protected void btnCommit_ServerClick(object sender, EventArgs e) 28
{ 29
int pid = Convert.ToInt32(Request.QueryString["p"]); 30
ClientScriptManager cs = this.ClientScript; 31
Pop p = new Pop(); 32
p.pid = pid; 33
p.adminrev = this.txtPopRev.Text; 34
PopOperate po = new PopOperate(); 35
bool b = po.update(p); 36
if (b) 37
{ 38
Response.Redirect("~/pop.aspx"); 39
40
} 41
else 42
{ 43
this.lblErrorComment.Text = "回复出错,请重新尝试"; 44
} 45
} 46
} 47





}
}