asp.net mvc - Access from View a an ID from a list inside array -
i have next structure:
public class mytype { public int id { get; set; } public string name { get; set; } } public class myviewdata : objetoviewmodel { public list<mytype>[] listparams { get; set; } } with that, have loaded 5 lists of type mytype within listparams array.
i'm trying access first id of first list view , i'm not having success. im trying somthing like:
<%: html.label(model.listparams[0]. ???? )%></td> but can't reach value
to print out element y of list @ array element x need following:
<%: model.lstparams[x][y].id %> html.labelfor generating text labels (by default) display name of property represented input, input look representing property, not value of property, you're trying produce.
asp.net-mvc asp.net-mvc-3
No comments:
Post a Comment