-1
con.Open();
SqlDataAdapter da4 = new SqlDataAdapter("select * from tblbooking where bookid =(select max(bookid) from tblbooking)", con);
DataSet ds4 = new DataSet();
pay = ds4.Tables[0].Rows[0]["costoftickets"].ToString();
Label4.Text = "Amount to Pay : " + pay + " INR.";
da4.Fill(ds4);
DetailsView1.DataSource = ds4;
DetailsView1.DataBind();
con.Close();
你可以調試ds4.Tables [0] .Rows.Count嗎? – dekdev 2013-04-22 21:12:43