I am trying to figure out how to pass the model object from controller to view in a following scenario:
<% Html.Action(\"GetRequest\", \"The_Controller\", new
It seems that you've got all the necessary information, up front, to create a 'Request' object in your initial controller action method.
Suggest that:
drop the <% Html.Action("GetRequest", "The_Controller", new { requestId = 12 }); %>
altogether. We'll be prepopulating ViewData with all the data required to send to the Partial.
in your initial controller method, you create a new ViewData entry, perhaps ViewData["SomeRequest"]
prepopulate that as you need on the initial controller method, using requestId = 12
and email = "foo@bar"
, and all the other relevant pieces to create a 'Request' object, or whatever is needed in the Partial View named 'Request'.
i.e. ViewData["SomeRequest"]= dbRepository.GetRequestById(intrequestId);
in your View, call Html.RenderPartial("Request", ViewData["SomeRequest"]);