I am dynamically inserting buttons into a formview. I call the subroutine below on page load (if not postback), as well as when the user clicks the next button.
The next button also pages through the formview by:
FormView1.PageIndex += 1
The buttons load fine on the initial page load, but the code above which is called when the next button is clicked makes my buttons disappear. When I remove it, the buttons update fine. I eventually plan to replace the button text with data from the sqlserver, just haven't done so yet, still making sure basic functions work.
Don't worry about the randomizer, it just randomizes the order of my buttons. It's working fine, I've debugged it.
What do I need to change?
Protected Sub update_buttons()
Dim randindex(0 To 3) As Integer
randindex = randomize()
Dim ans1 As New Button()
With ans1
.Css ...
Go to the complete details ...