日期:2014-05-17  浏览次数:20763 次

关于MVC的问题求助
最近刚刚接触MVC,自己看着msdn上面的例子自己写了个小程序,然后就遇到了不解的问题。

        <ul>
            <%foreach (CostList cost in (IEnumerable)ViewData.Model) { %>
                <li>
                日期:
                    <%=cost.Date.ToShortDateString() %>
                    <%if (cost.IsCompleted){%>
                    -- 花费:
                    <del><%=cost.Money.ToString() %></del>
                    &nbsp;&nbsp;
                        已清算
                    &nbsp;&nbsp; &nbsp;&nbsp;
                    登记人:
                    <del><%=cost.MainName %></del>            
                    <%} %>
                    <%else { %>
                    -- 花费:
                    <%=cost.Money.ToString() %>
                    &nbsp;&nbsp;
                        未清算
                    &nbsp;&nbsp; &nbsp;&nbsp;