The MVC pop-up sub-page transfers values to the parent page, and the mvc pop-up page
The idea is to use js to pass values between parent and child pages.
View 1 code, parent page
@{ ViewBag.Title = "Index";}<script type="text/javascript"> //alert("1"); function test() { window.showModalDialog('test/listtest', 'newwindow', 'height=400,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no, status=no') var temp = window.showModalDialog('test/listtest', 'newwindow', 'height=400,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no, status=no') document.getElementById("test").value = temp; }</script>
View 2 code: subpage
@model IEnumerable<mvctest.Models.student>@{ ViewBag.Title = "listtest";}<script type="text/javascript"> function sendvalue(a) { alert(a); document.getElementById("test").value = a; window.returnValue = a; window.close(); }</script><p> <input type="submit" value="sendvalue" onclick="sendvalue()"> <input type="text" id="test" value=sendvalue></p>