这段代码什么意思?请教大神。
public partial class kaoshi : System.Web.UI.Page
{
public int int_row1 = 0;
public int int_row1Point = 0;
public int hsgzf = 0;
protected void Page_Load(object sender, EventArgs e)
{
//string dd1 = Application["d1"].ToString();
//string dd2 = Application["d2"].ToString();
if (Session["username"] != null)
{ }
else
{
Response.Write("<script>javascript:alert('对不起,请您先登陆!');history.back();</script>");
Response.End();
}
if (!IsPostBack)
{
Button2.Visible = false;
string sql;
sql = "select top 5 * from shiti where 1=1 order by newid() desc";
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
DataList1.DataSource = result.Tables[0];
DataList1.DataBind();
}
else
{
DataList1.DataSource = null;
DataList1.DataBind();
}
}
for (int tID1 = 1; tID1 <= DataList1.Items.Count; tID1++)
{
Label lblSelect = (Label)DataList1.Items[tID1 - 1].FindControl("Label2");
lblSelect.Text = tID1.ToString() + "、";
Label lblSelect2 = (Label)DataList1.Items[tID1 - 1].FindControl("Label1");
lblSelect2.Visible = false;
}
}
}