I'm trying to p开发者_Go百科opulate a dropdown list with a list returned by a query to my object's facade. I've seen a couple examples here but nothing close enough to my use case. Seems like:
<%= Html.DropDownList("User.Affiliate", UserFacade.Instance.SelectAffiliates())%>
should work but doesn't.
Try using
<%= Html.DropDownList("User.Affiliate",
new SelectList(UserFacade.Instance.SelectAffiliates()))%>
精彩评论