WebApplication/NewsInfo.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication
{
public partial class NewsInfo : System.Web.UI.Page
{
BLL.Models.Model bll = new BLL.Models.Model();
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (Request["infoid"] != null)
{
DataTable dt = bll.GetContentInfo(int.Parse(Request["infoid"].ToString()), "News");
if (dt.Rows.Count>0)
{
HiddenField1.Value=dt.Rows[0]["ClassID"].ToString();
Literal1.Text = dt.Rows[0]["Title"].ToString();
Literal2.Text = dt.Rows[0]["AddDate"].ToString();
Literal3.Text = dt.Rows[0]["Content"].ToString();
DBUtility.DbHelperSQL.ExecuteSql("update News set Hits = Hits +1 where InfoID = " + int.Parse(Request["infoid"].ToString()));
}
}
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
