Wiring up Entity Framework to DropDownList ASP.NET.
Prereq --- Setup Entity Framework.
Private Sub FillSource()
ctx = New Context()
Dim qry = From p In ctx.tbl_names
Where p.ACTIVE = True
Order By p.name
Select p.id, p.name
ddlFundSource.DataSource = qry.ToList()
ddlFundSource.DataValueField = id"
ddlFundSource.DataTextField = "name"
ddlFundSource.DataBind()
ddlFundSource.Items.Insert(0, New ListItem("[Any Fund]", "0")) ' Tip if you want to add a default value.
End Sub
Software engineering and business solutions blog featuring SaaS reviews, automation tools, and business insurance guides. Buyer-intent content designed to drive high-quality traffic and conversions.
Subscribe to:
Post Comments (Atom)
How to Access a Home Lab Remotely Securely
Understanding Remote Access to Home Labs Definition and Common Use Cases A home lab is a personal network environment where technology e...
-
How to clear SharePoint People Picker suggestion cache If you have been SharePoint Site owner long enough, you would have definitely ...
-
Getting the following error (Figure 1): Server Error in '/' Application. ID4014: A SecurityTokenHandler is not registered to ...
-
The problem was that the remote connection needed to utilize Named Pipes, but in order to utilize Named Pipes both the machine hosting the i...
No comments:
Post a Comment