SQL Select Query in ASP.Net
I have a table that contains information like(examId, examActive) and I want to display a particular examId in a textbox. I am new
in ASP.Net and SQL. Please Help me. Here is my code, what
else I have to do.
vcon.Open();
SqlDataAdapter da = new SqlDataAdapter("select examId from ExamConfig where examActive='1'", vcon);
DataTable dt = new DataTable();
DataSet ds = new DataSet();
da.Fill(ds);
txtExamId.Text = dt.Rows[1]["examId"].ToString();
vcon.Close();