Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
118619 Points
18779 Posts
May 01, 2012 05:33 AM|LINK
QuantumInformation do you know the best way to iterate over this Arraylist (at bold)in my view to output select options?
Suppose your "types" is a collection of string,you've saved into ViewData——So you can do this:
<div class="editor-label"> <label for="type">Type</label> </div> <div class="editor-field"> <%
foreach(string s in ((IEnumerable<string>)ViewData["types"]) {
//Deal with s
}
%> </div>
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Help with c# XPath
May 01, 2012 05:33 AM|LINK
Suppose your "types" is a collection of string,you've saved into ViewData——So you can do this:
<div class="editor-label">
<label for="type">Type</label>
</div>
<div class="editor-field">
<%
foreach(string s in ((IEnumerable<string>)ViewData["types"])
{
//Deal with s
}
%>
</div>