I want to pass a model as parameter to FileStreamResult in my controller but I get null. This the controller file where I want to get my model in m
[HttpPost]
public FileStreamResult GETPdf(MarkModel m)// here i want value from my view
{
var MarkRe = new List<Mark>();
var mark = new List<MarkModel>();
using (StudentInfoSystemEntities db = new StudentInfoSystemEntities())
{
mark = (from e in db.Marks
from s in db.Students
where e.StudentId == s.ID
&& e.StudentId == m.StudentId
select new MarkModel
This is my view from where i want to send value to controller
<div class="editor-field">
@Html.DropDownListFor(m => m.StudentId, @ViewBag.Students as List<SelectListItem>)
@Html.ValidationMessageFor(m => m.StudentId)
</div>
<div>
Export Data : @Html.ActionLink("Export to PDF", "GETPdf", "GetMarkRec")
</div>