I have an ASP.NET MVC app that opens a “Request” view in a new browser window. When the user submits the form, I’d like the window to close. What should my RequestController code look like to close the window after saving the request information? I’m not sure what the controller action should be returning.
Share
You could return a View that has the following javascript (or you could return a JavaScript result) but I prefer the former.
View for Close:
Here is a way to do it directly in your Controller but I advise against it