I am using SQLDataSource to connect to MySQL. I have a gridview that retrieves information from MySQL database based on a selected id(dropdownlist). I need to display the gridview results on labels. I used lbDate.Text = GridView1.Rows(0).Cells(0).Text to display however, it always displays the details of the previously selected id. Which means it displays the information wrong information. What I understand is that it does the page load method( lbDate.Text = GridView1.Rows(0).Cells(0).Text) before it retrieves the new information, that's why it always shows the previous info. Can anyone help me. Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.