Asp.net源码专业站
首页->留言本类->三层班级留言本源码>>Class/AddBack.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:三层班级留言本源码
当前文件:文件类型 ClassSay/Class/AddBack.aspx.cs[2K,2009-6-12 11:36:01]打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using UserInfoLib; 12 13//该源码下载自www.51aspx.com(51aspx.com) 14public partial class AddBack : System.Web.UI.Page 15{ 16 17 private void Clea() 18 { 19 this.TextBox1.Text = ""; 20 Session.Remove("TextID"); 21 this.Response.Write("<script>window.setTimeout('window.close()',0);</script>"); 22 } 23 24 private void InsertBack() 25 { 26 UserInfo user = new UserInfo(); 27 user.TextID = int.Parse(Session["TextID"].ToString()); 28 user.BackBody = this.TextBox1.Text; 29 user.UserName = Session["User"].ToString(); 30 if (this.TextBox1.Text!=null && this.TextBox1.Text!="") 31 { 32 if (user.InsertBack() == 2) 33 { 34 this.Response.Write("<script>alert('回复成功!');</script>"); 35 } 36 else 37 this.Response.Write("<script>alert('出现未知错误,无法回复!');</script>"); 38 } 39 else 40 { 41 this.Response.Write("<script>alert('出现未知错误,无法回复!');</script>"); 42 } 43 Clea(); 44 } 45 46 47 protected void Page_Load(object sender, EventArgs e) 48 { 49 if (!Page.IsPostBack) 50 { 51 if ((Session["User"] != null) && (Session["Root"] != null) && (Session["Root"].ToString()) != "0") 52 { 53 this.Label1.Text = Session["User"].ToString(); 54 this.Button2.Attributes.Add("onclick", "window.close();"); 55 } 56 else 57 { 58 this.Response.Write("<script>window.setTimeout('window.close()',1000);</script>"); 59 this.Response.Redirect("index.aspx"); 60 //this.Page.RegisterStartupScript("closewindow", "<script>window.close()</script>"); 61 } 62 } 63 } 64 protected void Button1_Click(object sender, EventArgs e) 65 { 66 InsertBack(); 67 Clea(); 68 } 69} 70
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:三层班级留言本源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146