if (!IsPostBack)
{
SetIntailRow();
// SetGrid();
this.BindGrid();
}
SqlConnection con = new SqlConnection(@"Data Source=AQSASHAIKH\SQLEXPRESS;Initial Catalog=Client;Integrated Security=True");
string com = "Select * From [dbo].[client]";
SqlDataAdapter da = new SqlDataAdapter(com, con);
DataTable dt = new DataTable();
da.Fill(dt);
DropDownList1.DataSource = dt;
DropDownList1.DataBind();
DropDownList1.DataTextField = "Name";
DropDownList1.DataValueField = "id";
DropDownList1.DataBind();
SqlConnection Conn = new SqlConnection(@"Data Source=AQSASHAIKH\SQLEXPRESS;Initial Catalog=Client;Integrated Security=True");
SqlCommand Comm1 = new SqlCommand(com, Conn);
Comm1.Connection = Conn;
Comm1.CommandText = "SELECT COUNT(*) FROM client";
Conn.Open();
TxtBox1.Text = Comm1.ExecuteScalar().ToString();
TxtBox2.Text = Comm1.ExecuteScalar().ToString();
Conn.Close();
}

Sachin SinghRank #66 · 26.2K reputationPosted Oct 3, 2020, 6:30 AM EDT
Rajanikant HawaldarRank #110 · 20.4K reputationPosted Oct 2, 2020, 8:12 PM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Oct 3, 2020, 7:33 PM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Oct 3, 2020, 4:34 AM EDT