I have the following code to generate a list and will allow developers to customize the output if needed.
<% Html.List<MyList>(item => item.Property).Value(item => return "<div>" + item.Property + "<br/>" + item.AnotherProperty + "</div>").Render() %>
This is not ideal, how can I allow the developers to add the html similar to other controls.
<% Html.List<MyList>(item => item.Property).Value(item => %> <div><%=item.Property%><br/><%=item.AnotherProperty%></div><%).Render() %>
This way is much cleaner and standard with the rest of mvc.