<label for="clientName">Client Name: </label> <input type = "text" size =25 data-autocomplete="@Url.Action("QuickSearch", "Client")" name ="searchClientName" /> <div> @* <input type="button" value="Find / Refresh" id="ClientsSearch" data-url="@Url.Action("Client", "Client")" />*@ <input type="button" value="Find / Refresh" id="ClientsSearch" onclick="location.href=@Url.Action("Client", "Client")" />My idea is to somehow pass new route values to the action this way:
<input type="button" value="Find / Refresh" id="ClientsSearch" onclick="location.href=@Url.Action("Client", "Client", new {searchClientName =)" />and here after = I need to somehow pass that searchClientName input box value.
$(function () { $('#ClientsSearch').click(function () { // Here I somehow want to set the location.href - or what is the right way to send it here to controller and pass parameters correctly using that other control name? // $('#flexClients').flexOptions({ url: '/Client/Client/' }).flexReload(); //$.ajax({ // url: $(this).data('url'), // type: 'GET', // cache: false, // success: function (result) { // $('#ClientsResults').html(result); // } //}); return false; }); });