private int ID = 0; protected void Page_Load(object sender, EventArgs e) { ID = Convert.ToInt32(Request.QueryString["ID"].ToString()); if (!IsPostBack) { BindControlvalues(); } } private void BindControlvalues() { con.Open(); SqlCommand cmd = new SqlCommand("SELECT * FROM tbl_SqlImage where ID=" + ID, con); SqlDataAdapter da = new SqlDataAdapter(cmd); con.Close(); DataSet ds = new DataSet(); da.Fill(ds); txtName.Text = ds.Tables[0].Rows[0][1].ToString(); txtDesc.Text = ds.Tables[0].Rows[0][2].ToString(); //lblImage.Text = ds.Tables[0].Rows[0][3].ToString(); DropDownList1.Text = ds.Tables[0].Rows[0][4].ToString(); txtCreatedBy.Text = ds.Tables[0].Rows[0][5].ToString(); txtCreDate.Text = ds.Tables[0].Rows[0][6].ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)