protected void showDataTable() { //DataTable dt = dbHelper.returnDataTable("select * from Emp_Mast where E_Id='" + ViewState["id"] + "' and isDeleted=0"); SqlCommand cmd = new SqlCommand("select * from tbl_Products",con); SqlDataAdapter DA = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); DA.Fill(dt); if (dt.Rows.Count > 0) { txttitle.Text = dt.Rows[0]["Title"].ToString().Trim(); txtdescrip.Text = dt.Rows[0]["description"].ToString().Trim(); txtUserId.Text = dt.Rows[0]["E_Login"].ToString().Trim(); //txtPassword.Text = dt.Rows[0]["E_Pwd"].ToString().Trim(); txtPassword.Text = "*****"; txtUserId.ReadOnly = true; txtPassword.ReadOnly = true; //ddlBranch.SelectedValue=int.Parse(dt.Rows[0]["B_Id"].ToString()); string mc = dt.Rows[0]["B_Id"].ToString(); try { ddlBranch.SelectedValue = mc; } catch { ddlBranch.SelectedIndex = 0; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)