ASP.NET MVC Html.BeginRouteForm render's action with problem
- by Sadegh
hi, i defined this route:
context.MapRoute("SearchEngineWebSearch", "{culture}/{style}/search/web/{query}/{index}/{size}",
new
{
controller = "search",
action = "web",
query = "",
index = 0,
size = 5
},
new
{
index = new UInt32RouteConstraint(),
size = new UInt32RouteConstraint()
});
and form to post parameter to that:
<% using (Html.BeginRouteForm("SearchEngineWebSearch", FormMethod.Post))
{ %>
<input name="query" type="text" value="<%: ViewData["Query"]%>" class="search-field" />
<input type="submit" value="Search" class="search-button" />
<%} %>
but form rendered with problem. why?
thanks in advance ;)