Regarding data from table to a textbox.

Ankit - Nov 17, 2011 at 11:02 PM
 Blocked Profile - Nov 18, 2011 at 12:06 AM
this is my table is sign_up and i wanna get fetched the record of tht table in to can I do that

protected void Page_Load(object sender, EventArgs e)

protected void Button2_Click(object sender, EventArgs e)
DataSet ds = new DataSet();
string query = ("select * from sign_up where emp_code='" + TextBox1.Text + "' ");
SqlConnection con = new SqlConnection("Data Source=;Initial Catalog=test;User ID=sa;Persist Security Info=False");
SqlCommand cmd = new SqlCommand(query, con);
SqlDataAdapter adp = new SqlDataAdapter(cmd);
GridView1.DataSource = ds.Tables[0];

protected void Button1_Click(object sender, EventArgs e)

protected void TextBox2_TextChanged(object sender, EventArgs e)


1 response

Blocked Profile
Nov 18, 2011 at 12:06 AM

Please, bare in mind that before any answer given on the forum, you should know that there are volunteers who give their time trying to solve user problems. They do have a life other than this forum including me.

Therefore, it is specifically requested from Kioskea forum users to show their respect. For this, the use of polite expressions is a minimum.

To say please, thank you, appreciate, grateful, etc... is common courtesy when you want something, especially help!

You must copy, modify and repost your message respecting the politeness charter.

We trust that you understand.