Q:

Can I get Razor to use some form input as part of the form action URI?

I have a problem with setting correct action attribute value using ASP.NET MVC routing mechanism.
I am using routes.MapMvcAttributeRoutes(); in RouteConfig class and I am setting URL address for every action by myself. And now I want form to move to defined URL address after I submit it, but there in no correct URL in action attribute (or there is none).
Here is code I use.
Controller:
[RoutePrefix("search")]
public class SearchController : BaseController
{
    [HttpGet]
    [Route("search/{query}/{author?}/{category?}/{mediaType?}/{color?}/{resultPerPage?}/{startElement?}", Name = "Search_Search")]
    public ActionResult Search(string query, string author = "none", int category = 0, int mediaType = 0, int color = 0, int resultsPerPage = 15, int startElement = 0)
    {
            //doing some stuff here...
    }
}

And now the .cshtml file fragment:
@using (Html.BeginForm("Search", "Search", FormMethod.Get))
{
}

Action attribute in generated form is like "/Search/Search", but that address does not work (404 error). I've tried use Html.BeginRouteForm with and without additional route configuration:
routes.MapRoute(
    name: "SearchFormRoute",
    url: "search/search/{query}/{author}/{category}/{mediaType}/{color}/{resultPerPage}/{startElement}",
    defaults: new
    {
        author = "none",
        category = 0,
        mediaType = 0,
        color = 0,
        resultsPerPage = 15,
        startElement = 0
    },
    constraints: new
    {
        httpMethod = new HttpMethodConstraint("GET")
    }
);

I have tried it two ways, Html.BeginRouteForm("SearchFormRoute") and Html.BeginRouteForm("Search_Search"). Sometimes action attribute is set (but it's incorrect) and sometimes it's empty.
I really don't know how I shoud set it all up to work correctly. Is there any way to redirect form to manually defined with routing settings URL address?
EDIT: added whole form code
There is form code I am using:
@using (Html.BeginForm("Search", "Search", FormMethod.Get))
{
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="input-group">
                <div class="col-md-9 nopadding">
                    <input type="text" id="query" name="query" class="form-control navSearchInput" placeholder="search...">
                </div>
                <span class="input-group-btn">
                    <button class="navSearchButton" type="submit">
                        <i class="fa fa-search-plus"></i>
                    </button>
                </span>
            </div>
        </div>
    </div>
}

EDIT: added generated form code
<form action="/Search/Search" method="get">    
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="input-group">
                <div class="col-md-9 nopadding">
                    <input type="text" id="query" name="query" class="form-control navSearchInput" placeholder="search...">
                </div>
                <span class="input-group-btn">
                    <button class="navSearchButton" type="submit">
                        <i class="fa fa-search"></i>
                    </button>
                </span>
            </div>
        </div>
    </div>
</form>

A:

If you try to access /Search/Search (just that) you'll get a 404 because your query route parameter is required.  Any requests to /Search/Search will therefore not match a route.
But the same is true of requests of the form /Search/Search?query=blah, because your route is requiring that query be a route parameter, whereas here query is coming from the query string.  So again, 404.
To get what you want you'll have to use Javascript to handle the form submission, and make sure that query is part of the route.  Something like:
$("formIdHere").on("submit", function () { 
    this.action += WHATEVER_YOU_WANT_TO_ADD; 
    this.submit(); 
});

