vb.net - DropDownListFor using List of Class -


I can not seem to have my HTML DropDownListFor () to work properly with my structures.

CategoriesEditViewModel

  Public Class CategoriesEditViewModel Public Property Categories cihCategoryOrgDef as public property category lists public properties as cihLists (cihCategoryOrgDef ) As new = cihLists () public property SelectedItem string publicly subid (CatID as GUID) SelectedItem = codId.ToString lists.loadClubWaivers (ZenCommon.CurrentOrgId) End Sub Ending Class   

cihLists

  private orgWaiverList public sub-loadClub Waivers (orgId as GUID) (list of cihWaiver) as' list (cihWaiver)   cihWaiver    public class cihWaiver public discount as Guid = Guid.Empty public discount not me as string = " "Public waiverText string =" means the final class   

see edited Page

  @ Html.DropDownListFor (function (m) m.SelectedItem, New selectList (Model.lists.organizationClubWaivers, "waiverId", "waiverText", Model.lists.organizationClubWaivers ))   

error I get 'library. There is no property with name "mafia" in Sehwaver.

But in the cihWaiver class there is clearly an item for 'mafia'. I have not done MVC content in some time, so perhaps I am doing all this wrong.

Answer: To change my cihWaiver class is very simple: public class cihWaiver public property waiverId GUID = Guid.Empty as public property waiverName as string = "" publicly as string = "" and class

Sugarcane has anyone explained to me why the keyword property is so important

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -