Sir I want to show the passwor from database into Lable,I have wright code following
SqlConnection con = new SqlConnection(@"Data Source=TEGADEV1\SQL2K5EXPR;Initial Catalog=mydatabase;Integrated Security=True;Pooling=False");
SqlCommand cmd = new SqlCommand("select password from reg where username='" + username + "'", con);
cmd.Parameters.AddWithValue("@username", username);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
Lable.Text=......
I have use datatable how to read data from above code what will be the code wright Lable.Text=...