Web/Default.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataSet ds = new PSD.BLL.news().GetAllList();
DataTable dt = ds.Tables[0];
CreateImage ci = new CreateImage();
int flag = 0;
Literal1.Text = "var titles = '";
Literal2.Text = "var imgs = '";
Literal3.Text = " var urls = '";
foreach (DataRow dr in dt.Rows)
{
string addr = ci.GetImageUrl(dr["memo"].ToString());
if (addr != "")
{
Literal1.Text += dr["title"].ToString() + "|";
Literal2.Text += addr + "|";
Literal3.Text += "newsView.aspx?id=" + dr["nid"].ToString() + "|";
flag++;
if (flag >= 5)
{
break;
}
}
}
Literal1.Text = Literal1.Text.Substring(0, Literal1.Text.Length - 1);
Literal2.Text = Literal2.Text.Substring(0, Literal2.Text.Length - 1);
Literal3.Text = Literal3.Text.Substring(0, Literal3.Text.Length - 1);
Literal1.Text += "';";
Literal2.Text += "';";
Literal3.Text += "';";
PSD.BLL.products bll = new PSD.BLL.products();
Repeater1.DataSource = bll.GetList2(" top 10 * ", " 1=1 order by tt desc ");
Repeater1.DataBind();
Repeater2.DataSource = bll.GetList(10, "", " pid desc ");
Repeater2.DataBind();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。