use data table to load table in database
ex:-
public void GetFloorPlan()
{
cmd = new SqlCommand("Select FloorId,FloorTitle,FloorMapUrl,DisplayOrder,GroupName From FloorPlanDetail Where ProjId='" + Request.QueryString["ProjectId"].ToString() + "'", cn);
cmd.CommandType = CommandType.Text;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
dlFloorPlanDetail.DataSource = dt;
dlFloorPlanDetail.DataBind();
}
dr.Close();
}
Sushat
Saranya Boopathi, if this helps please login to Mark As Answer. | Alert Moderator