Hi all, I am having trouble retrieving data from a textbox. This is my code.
Dataset class:
public DataSet Ques() //create dataset for ListQue()
{
cnn.Open();
adpt.Fill(ds1,
cnn.Close();
}
ListQues() class:
ds1 = Ques();
q.answer1 = ds1.Tables[
q.answer2 = ds1.Tables[
q.answer3 = ds1.Tables[
q.answer4 = ds1.Tables[
txtAns1.Text = q.ToString();
txtAns2.Text = q.ToString();
txtAns3.Text = q.ToString();
txtAns4.Text = q.ToString();
comboBox1.DataSource = ds1.Tables[0];
comboBox1.DisplayMember =
The thing is, it can get through the SQL statement and retrieve data from combobox but it doesn't show up in textboxes.
Any clues?