asp.net - Form Method.GET: Only show populated inputs in Query String? -


I am working in an ASP.NET mvc application and I have a data table. I have a form with different inputs to filter the table above the data table.

The form is using the GET method for transferring form data from the server, which works fine, although though I'm the only thing (like the manufacturer's name) I want to filter, all other input parameters are also posted in the query string! Like:

  http: // localhost / mysite / page1? Tab = Pending & SortBy = & SortAscending = False & amp; Manufacturer = Toyota & amp; Model = & amp; RegNumberFilter =   

As you can see, I only have the creator filled, but everything else is stored! Is there an easy way to clear my URL so that only the filters set are displayed in the query string?

My filter form is below:

  & lt; Div class = "panel-body" & gt; @ (Html) ({@ole = "form", @class = "form-inline"})) {@ Html.Hidden ("tab", model: "indices", "page 1", formmath gate, new { .tab); @ Html.Hidden ("SortBy", Model.SortBy); @html Hidden (= "Creator" & gt; Manufacturer & gt; Manufacturer & lt; / label & quot; div class = "form-group"> 

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -