How to display gridview details to labels dynamically?
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
April 17, 2012 at 3:19 PM
Related Tutorials/Questions & Answers: