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

MVC2 Views 传值到Controller问题
先上代码
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcSMC.Models.PageData<MvcSMC.Models.Account>>" %>
第二段代码
 <div class="div_search">    
    <% using (Html.BeginForm()) { %>
   <table border="0" cellpadding="0" cellspacing="1">
                        <tr>
                            <td class="align_right">客户姓名:</td>
                            <td class="align_left search_filed">
                                <%: Html.TextBoxFor(m => m.PageIndex)%> <%--//MODEL传值应该是ACCOUNT表的--%>                            </td>
                            <td class="align_right">客户账号:</td>
                            <td class="align_left search_filed">
                                <%: Html.TextBoxFor(m => m.Count)%>                            </td>
                            <td class="align_center">
                                <input id="Button1" type="button" value="查询" />
                            </td>
                        </tr>
                    </table>
    <% } %>
    </div>

第三段代码
<% foreach (var item in Model.GetDate) { %>
    
        <tr>