Posted on: 10/3/2014 5:52:46 AM | Views : 366

Hello guys,
I want to ask,how when I input the data ID, then database value appears in the textbox.



Code for method Search
protected void btnSearch_Click(object sender, ImageClickEventArgs e) { string sql; sql = "SELECT * FROM UserData WHERE ID = '" + txtID.Text + "'"; SqlCommand cmd = new SqlCommand(sql, objCONN); objCONN.Open(); int count = (int)cmd.ExecuteScalar(); objCONN.Close(); if (count > 0) { txtUsername.Text = dtREG.Rows[intINDEX]["Username"].ToString(); txtEmail.Text = dtREG.Rows[intINDEX]["Email"].ToString(); } else { Response.Write("SEARCH BY ID VALID"); } My app search id for Edit Value ...

Go to the complete details ...