JAS Posted January 16, 2006 Posted January 16, 2006 I have a problem with controls on a webform not storing the selected index after a postback. The controls are databound only once ( in createMenu() ) as I use Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here If Not IsPostBack Then CreateMenu() InitialiseDates() panelParams.Visible = False End If End Sub The postback is initiated by a click on a button Private Sub cmdGenerateReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerateReport.Click LoadReport() DateSelect() End Sub Neither Loadreport() or DateSelect() call a databind The View state for the controls is on it does not seem to matter what list control I use (dropdownlist, radiobuttonlist etc) but the selected index is always reset to 0 after the postback I have seen lots of examples of the same problem in forums and on the web but no one seems to have posted an answer that I can get to work. Can you help? Thanks JAS Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.