I have a page in my .Net MVC project that calls a pop up using javascript. Now I need to send a property that I get from my model over to the actionresult so that I can work with it.
What my page looks like
<script type="text/javascript">
//function print() {
// $(".btnPrint").printPage();
ShowPopUp = function () {
window.showModalDialog("/FileUpload/GetPopupData/ --Pass my Model property, what to do? --", "wndPopUp", "width=300,height=500");
}
My Action Result where I want to use the property
public ActionResult GetPopupData(int consignmentId)
{
var test = consignmentId;
//Call the pop up view and populate it accordingly
return new GetDocumentTypeAction<ActionResult>
{
OnLoaded = m => View("../../Areas/Exports/Views/FileUpload/FileUpload", m),
OnErrorOccured = (m) => Redirects.ToErrorPage()
}.Execute(GtsClient);
}