I'm trying to programatically populate some dropdownlists inside a formview in EDIT mode, like this below.
Dim FVM As String = FormViewMemberProfile.CurrentMode.ToString
If FVM = "Edit" Then
Dim ddlDays As DropDownList = CType(FormViewMemberProfile.FindControl("ddlDays"), DropDownList)
Dim ddlYears As DropDownList = CType(FormViewMemberProfile.FindControl("ddlYears"), DropDownList)
Dim i As Integer = 1
For i = 1 To 31
Dim k As Integer
For k = 1930 To 2008
I orginally had this running as part of the pagelaod event, but I'm thinking that b/c the page loads first, it doesn't populate the fields in EDIT mode until after the data is saved, and then page is reloaded. Now it knows it's in "Edit" mode. Am I thinking clearly here? Not sure if this is the order of things... Anyhow...
So I thought I should just use a formview_modechanged (or similar event) so when the user switches modes, it populates the fields - but I'm not sure which event I should use. I've tried "Modechanging", "modechanged", "prer
View Complete Post