How to open MVC View in a new browser window

I have an ASP.Net MVC application. I would like to create a view that lists the contents of a simple collection and show it in a new browser window.

Is there a way to show the view in a new browser window using a simple link?

I struck out Html.ActionLink. The Url.Action below causes the Controller action to be called, but not opened in a new browser window.

Open MVC View in a new browser.

Does the view open in a new browser window in MVC?

If so, does anyone know how?

+4
source share
1 answer

You can specify target=_blank in the HTML properties of your link to open it in a new window. There is an Html.ActionLink parameter that allows you to specify arbitrary HTML properties to add to your link, for example:

 Html.ActionLink("Text", "Action", new { id = 1 }, new { target = "_blank" }); 
+10
source