Web/Detail.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;
using Wld.DBCore;
public partial class Detail : System.Web.UI.Page
{
public string title = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
if (Request["type"] == null && Request["id"] != null)
{
DBHelperSql help = new DBHelperSql();
publish publish = new publish();
publish = help.GetRow(new publish { id = int.Parse(Request["id"].ToString()) });
title = publish.articleTitle;
labContent.Text = publish.articleContent;
}
else
{
if (Request["type"] != null && Request["id"] == null)
{
DBHelperSql helper = new DBHelperSql();
DataTable t = helper.Select("select top 1 * from publish where catagoryid=" + Request["type"].ToString()+ " order by addtime desc");
if (t.Rows.Count > 0)
{
title = t.Rows[0]["articleTitle"].ToString();
labContent.Text = t.Rows[0]["articleContent"].ToString();
}
}
else
Response.Redirect("default.aspx");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
