Web/NewsInfo.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
namespace Maticsoft.Web
{
public partial class NewsInfo : System.Web.UI.Page
{
int NewsID = 0;
protected void Page_Load(object sender, EventArgs e)
{
InitNewTypeLoad();
if (Request.Params["NewID"] != null && Request.Params["NewID"] != "")
{
NewsID = int.Parse(Request.Params["NewID"]);
Maticsoft.BLL.NewsInfo nBll = new Maticsoft.BLL.NewsInfo();
if (nBll.Exists(NewsID) == false)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('对不起,改新闻已被删除, - 。-!)</script>");
Response.Redirect("News.aspx");
return;
}
SEO_HEAD();
}
else
{
Response.Redirect("News.aspx");
}
}
private void InitNewTypeLoad()
{
Maticsoft.BLL.NewsTypeInfo tBll = new Maticsoft.BLL.NewsTypeInfo();
DataNewType.DataSource = tBll.GetAllList();
DataNewType.DataBind();
}
public void SEO_HEAD()
{
Maticsoft.BLL.NewsInfo nBll = new Maticsoft.BLL.NewsInfo();
Maticsoft.Model.NewsInfo nModel = nBll.GetModel(NewsID);
lblContent.Text = nModel.E_TxtContent;
lblDatetime.Text = nModel.E_Starttime.ToString();
lblNewTitle.Text = nModel.E_NewsTitle;
lbllaiyuan.Text = nModel.E_Laiyuan;
try
{
Maticsoft.BLL.NewsTypeInfo tBll = new Maticsoft.BLL.NewsTypeInfo();
Maticsoft.Model.NewsTypeInfo tModel = tBll.GetModel(int.Parse(nModel.E_NewsTypeID.ToString()));
lblTypeName.Text = tModel.E_NewsTypeName;
lblTypeName2.Text = tModel.E_NewsTypeName;
}
catch
{
}
lblWrite.Text = nModel.E_Write;
HtmlMeta metaKeyWords = new HtmlMeta();
HtmlMeta metaDescription = new HtmlMeta();
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
