帮我看看ASP.net 代码?每一句的代码,说一下是什么定义?
代码如下SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=BBS;Integrated Security=true");
SqlCommand Cmd = new SqlCommand("select * from [Info] where ID=" + Request.QueryString["id"], conn);
conn.Open();
SqlDataReader obj = Cmd.ExecuteReader();
while (obj.Read())
{
LblName.Text = obj.GetValue(2).ToString();
LblDate.Text = obj.GetValue(4).ToString();
TxtSubject.Text = obj.GetValue(1).ToString();
TxtContent.Text = obj.GetValue(3).ToString();
}
obj.Close();
conn.Close();
string sql = "Select * From [info] where 回复编号='" + Request.QueryString["id"] + "'";
SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);
DataSet ds = new DataSet();
adapter.Fill(ds, "Reply");
DataList1.DataSource = ds.Tables[0].DefaultView;
DataList1.DataBind();