Home > Back-end >  This code is what mean? Consult a great god.
This code is what mean? Consult a great god.

Time:09-26

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 [r]. "d1" ToString ();
//string dd2=Application [r]. "d2" ToString ();

If (Session (" username ")!=null)
{}
The else
{
Response. Write (" & lt; script> Javascript: alert (' sorry, please login first! '); History. The back (); </script>" );
The Response. The End ();
}
if (! IsPostBack)
{
Button2. Visible=false;
String SQL;
SQL="select top 5 * from shiti where 1=1 order by newid (desc)";
The DataSet result=new DataSet ();
Result=new Class1 (.) hsggetdata (SQL);
if (result !=null)
{
If (result. Tables [0]. Rows. Count & gt; 0)
{

DataList1. The DataSource=result. Tables [0].
DataList1. DataBind ();

}
The else
{
DataList1. The DataSource=null;
DataList1. DataBind ();
}
}
For (int tID1=1; TID1 & lt;=DataList1. Items. The 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;
}
}

}

CodePudding user response:

Consult a great god to explain the best point in detail, novice don't understand,
  • Related