LT/AddFb.aspx.cs
(完整代码) 1KBusing System;
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 LT_AddFb : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//将相关内容显示在控件中
this.TUserName.InnerHtml = Session["UserID"].ToString();
this.Tdate.InnerHtml = DateTime.Now.Date.ToShortDateString();
}
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
//判断信息是否正确
if (TextBox1.Text == "" || Textbox3.Text == "")
{
TErr.InnerHtml = "<font>主题或内容不能为空</font>";
return;
}
//添加新的主题信息
DataBase.ExecSql("insert into SMLT(Ztbt,Ztnr,kh,Fbsj) values('" + this.TextBox1.Text + "','" + this.Textbox3.Text + "','" + Session["UserID"].ToString() + "','" + DateTime.Now.Date.ToShortDateString() + "')");
Response.Redirect("STLTList.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
//跳转页面
Response.Redirect("STLTList.aspx");
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
