I have the below error when I try to bind a drop down list from my database via entity frame work. Anyone know what the issue is? The data coming back from the database is good.
Error:
System.Web.HttpException (0x80004005): DataBinding: 'DropDownListDTO' does not contain a property with the name 'Text'.
Code:
Private Sub LoadExtraLinks()
Try
Dim ddlList As List(Of DropDownListDTO)
ddlList = BaseballRepository.GetTableLinks(LinkAreaOption.LinkAreaOption.Default_Extra_Links.ToString())
If ddlList.Count > 0 Then
ddlList.Insert(0, New DropDownListDTO With {.Text = "Select", .Value = "-1"})
ddlLinks.DataSource = ddlList.ToList()
ddlLinks.DataTextField = "Text"
ddlLinks.DataValueField = "Value"
...
Go to the complete details ...