ASP.NET MVC Html.BeginRouteForm render's action with problem

Posted by Sadegh on Stack Overflow See other posts from Stack Overflow or by Sadegh
Published on 2010-05-30T04:50:41Z Indexed on 2010/05/30 4:52 UTC
Read the original article Hit count: 1263

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 ;)

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about asp.net-routing