Hi I'm using visual studio 2008 with .net 3.5. I have an AccessDataSource that is linked to a access database. I have a dropdownlist that use the AccessDataSource. Everything was done with the wizard and everything was working just fine.
At the page load I decided to call the SelectedIndexChanged of my dropdownlist to update something with the selectedValue but to my suprise the selectedValue was an empty string.
To resolve the problem I put this in my page_load Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then
ddlAnniversaire.DataBind()
ddlAnniversaire_SelectedIndexChanged(Nothing, Nothing)
End If
End Sub
If I don't put ddlAnniversaire.DataBind() the ddlAnniversaire.selectedValue is "" in my method. Why?
Normally when is the ddlAnniversaire.DataBind() called?
Thanks