Asp.net mvc 3 需要在Html.BeginForm()中放置哪些参数
我有以下看法:Asp.net mvc 3 需要在Html.BeginForm()中放置哪些参数,asp.net-mvc-3,Asp.net Mvc 3,我有以下看法: <h2>enter the student name to search</h2> @using (Html.BeginForm()) { <label>Search:</label> <input type="text" name="searchString" /> <input type="submit" name="submit" /> } 控制器名称为SearchController.
<h2>enter the student name to search</h2>
@using (Html.BeginForm())
{
<label>Search:</label>
<input type="text" name="searchString" />
<input type="submit" name="submit" />
}
控制器名称为SearchController.cs,传递表单的方法名称为SearchIndex。
Html.BeginForm()中的参数应该是什么。我是乞丐
Html.BeginForm("SearchIndex", "Search", .....)
你应该读到这一点:我同意,你可以不只是谷歌一下吗<代码>Html.begin示例
Html.BeginForm("SearchIndex", "Search", .....)