admin/News/NewsAdd.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;
using SystemNewsBll;
public partial class admin_News_NewsAdd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ResetBtn_Click(object sender, EventArgs e)
{
Response.Redirect("NewsList.aspx");
}
protected void Addbtn_Click(object sender, EventArgs e)
{
if (Page.IsValid == true)
{
try
{
string id = ddlclass.Text.Trim();
string title1 = title.Text.Trim();
string title2 = TextBox1.Text.Trim();
string content = WebEditor1.Text;
string content_en = WebEditor2.Text;
if (NewsBll.InsertData(id, title1, content, title2, content_en) > 0)
{
Response.Write("<script>if (confirm('" + "添加信息成功!是-转到列表,否-选择继续修改" + "')){window.location.href='NewsList.aspx'}</script>");
}
}
catch (Exception ex)
{
//Response.Redirect("ErrorPage.aspx?ErrorMsg=" + ex.Message + "&ErrorUrl=" + Request.Url.ToString());
throw new Exception(ex.Message, ex);
}
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("NewsClassList.aspx");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。