I got the value of text box from view to one of my action in the controller. Now I need to send this value to post method of some other action which takes model values as its parameter. The action where I got the value from controller :
public ActionResult Track(string txtEmployeeNo)
{
ReporteesInboxModel objTrackRequestModel1 = new ReporteesInboxModel();
objTrackRequestModel1.strempno = txtEmployeeNo;
return RedirectToAction("TrackRequest", new { objTrackRequestModel = objTrackRequestModel1, ActionStatus = "" });
}
I need to redirect it to:
[HttpPost]
public ActionResult TrackRequest(ReporteesInboxModel objTrackRequestModel, string ActionStatus)
{
......
}
but the line :
return RedirectToAction("TrackRequest", new { objTrackRequestModel = objTrackRequestModel1, ActionStatus = "" });
redirects me to the GET method and not the post method.