protected void Page_Load(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=.;Integrated Security=true;Initial Catalog=myproject"); SqlCommand cmd = new SqlCommand("Select * from room where roomstatus like occupied'",con); con.Open(); GridView1.DataSource =cmd.ExecuteReader(); GridView1.DataBind(); con.Close(); }
SqlCommand cmd = new SqlCommand("Select * from room where roomstatus like occupied'",con);
occupied'"
SqlCommand cmd = new SqlCommand("Select * from room where roomstatus like 'occupied'",con);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)