I am posting a very simple form using a method I have used frequently in the past. It may be easier to show my code rather than type a lengthy explanation. Here\'s the HTML:
None of your inputs have a name attribute. No name = not in the FormCollection.
I see that this question is already answered. Following is another approach I used in a MVC view, when the form collection was empty. Using JavaScript / jQuery, it sets name-value pairs to a hidden control which gets appended to the form.
JavaScript / jQuery
$("#btnExport").click(function (event) {
event.preventDefault();
//Append the parameter to the form
var practiceVal = $('#Practice').val();
$('<input />').attr('type', 'hidden')
.attr('name', "Practice").attr('value', practiceVal)
.appendTo('#formHome');
//Submit
$('#formHome').submit();
});
Form
<form id="formHome" method="post">
</form>
Refer Forms
When a form is submitted for processing, some controls have their
name
paired with their current value and these pairs are submitted with the form
Wish I could post this as a simple comment, but I don't have that priviledge... I added all my name attributes, and still no joy. Remember to add your name attribute to your form itself. Must use the overload for HTML.BeginForm that accepts htmlAttributes.
I had this issue and then realised I had disabled all the INPUT controls before I submitted the form (as a UX feature).