0

当前页面网址:http://localhost:25265/SearchResultsList.aspx

视图看起来像:

@using (Html.BeginForm("RefineSearchResults", "Search", FormMethod.Post, new {id = "myForm"}))
{
 <input type="submit" value="submit" />
}

路线:

routes.MapRoute(
                "Search",
                "SearchResultsList.aspx",
                new { controller = "Search", action = "SearchResults" }
            );


routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}",
                defaults: new { controller = "Home", action = "Index"},
                namespaces: new[] { "MyApp.WebUI.Controllers" }
            );

但是,我注意到它正在产生空的动作。好像:

<form action method="post">
<input type="submit" value="submit"> </form>

谁能告诉我这是怎么回事?我哪里做错了!!

4

0 回答 0