I have a cshtml page where I ask the user to provide some input data that I then need to concatenate into a string to build a dynamic LINQ query in my controller. This view DOES NOT use a model. Here is my html code so far.
<div id="filter">
Enter a customer name. It can be a part of a name to get broader results. (optional)
<br />
<input type="text", id="customer", value="") />
<br />
Enter a case status ( OPEN or CLOSED ), or leave blank to get both. (optional)
<br />
<input type="text", id="status", value="") />
<br />
Enter a date range to filter by date. (optional)
<br />
Start Date
<input type="text", id="startdate", value="") />
End Date
<input type="text", id="enddate", value="") />
<br />
Enter a PromoID (optional)
<br />
<input type="text", id="promoid", value="") />
<br />
Enter a Complaint Code (optional)
<br />
<input type="text", id="complaintcode", value="") />
</div>
@Html.ActionLink("Export Case Data To Excel for Analysis", "CaseReport", "Reports", "Excel", new { stringFilter = mystring })
The controller action has a string parameter called stringFilter. I basically need to build a string filter and pass it to the controller. I am using the Dynamic Linq Query library.
How can I get the string values from the DOM?