0
我正在嘗試使用ASP.NET MVC 2,並且使用Html.BeginRouteForm
這個簡單的表單,它是工作文件,除了它將字符串System.Web.Mvc.Html.MvcForm
寫入html。爲什麼BeginRouteForm將類名寫入html?
爲什麼它這樣做,我該如何讓它停止?
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SelectList>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Index</h2>
<%=Html.BeginRouteForm(String.Empty, new {Action = "Search"}, FormMethod.Get) %>
<%:Html.DropDownList("worklist", this.Model)%>
<br />
<input type="submit" />
<% Html.EndForm(); %>
</asp:Content>
<h2>Index</h2>
<form action="/Site/Search" method="get">System.Web.Mvc.Html.MvcForm
<select Label="Worklists" id="worklist" name="worklist"><!-- Options -->
</select>
<br />
<input type="submit" />
</form>