您目前尚未登陆,请选择【登陆】或【注册
首页->留言本类->三层班级留言本源码>>Class/AddBack.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:三层班级留言本源码


当前文件路径:ClassSay/Class/AddBack.aspx.cs 文件类型
普通视图
		            
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源码大搜捕
代码片断 打包下载该项目完整源码:三层班级留言本源码

- Asp.net房产中介管理系统源码..

- BlogYi v1.6.5项目源文件

- SQL数据库在线管理系统源码

- GridView全选/反选示例源码

- 太糊留言板(VS2008+SQL2005)

- Webfort网站内容管理系统

- Baidu恶搞程序源码

- GridView实用示例源码附加导..

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号