Bind ISet in ASP.NET MVC2

Posted by Dmitriy Nagirnyak on Stack Overflow See other posts from Stack Overflow or by Dmitriy Nagirnyak
Published on 2010-05-03T07:47:15Z Indexed on 2010/05/03 8:28 UTC
Read the original article Hit count: 415

Hi,

I am trying to find out what would be the best bind first element of ISet (Iesi.Collection) as a first element.

So basically I only have to use some kind of collection that has an indexer (and ISet doesn't) then I can write code like this (which works perfectly well):

<%: Html.EditorFor(x => x.Company.PrimaryUsers[0].Email) %>

But as the ISet has no indexer I cannot use it.

So how can I then bind the first element of ISet in MVC2?

Thanks,
Dmitriy.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about asp.net-mvc