Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
4426 Points
864 Posts
Aug 18, 2010 08:37 AM|LINK
Because it's a property of your tag, there needs to be a defined beginning and end, without quotes it just views the first word as your property value
In terms of
<select name="NameDropDown">
<% foreach(var nameObject in Model.NameList)
{ %>
<option value = <%: nameObject.NameCode %> > <%: nameObject.Fullname %> </option>
<% }
%>
The same logic applies to the value property, but the nameObject.Fullname doesn't require quotes because it's between two tags :)
andrewjboyd
Contributor
4426 Points
864 Posts
Re: Pass model to view - List<...> truncated after space
Aug 18, 2010 08:37 AM|LINK
Because it's a property of your tag, there needs to be a defined beginning and end, without quotes it just views the first word as your property value
In terms of
<select name="NameDropDown">
<% foreach(var nameObject in Model.NameList)
{ %>
<option value = <%: nameObject.NameCode %> > <%: nameObject.Fullname %> </option>
<% }
%>
The same logic applies to the value property, but the nameObject.Fullname doesn't require quotes because it's between two tags :)
================================================
Why catch a fish to feed someone, when you can teach them to fish and they can feed themselves