Hi, I have the following code:
Protected Sub MyDropDownList_DataBound(ByVal sender As Object, ByVal e
As System.EventArgs)
Dim drv As DataRowView = MRFormView.DataItem
Dim ddlValue As String = drv("value")
Dim ddl As DropDownList = sender
If Not IsDBNull(ddlValue) Then
ddl.SelectedValue = ddlValue
End If
End Sub
Let's say ddlValue = 100. While debugging, when I check the value for
ddlSelectedValue after the line ddl.SelectedValue = ddlValue,
ddl.SelectedValue is and empty String "", even though ddlValue = 100.
I know this must be something very simple that are missing, but anyone
have any suggestions of what is happening?
I appreciate your help!
Ana