Open mvc view in new window from controller

This cannot be done from within the controller itself, but rather from your View. As I see it, you have two options:

  1. Decorate your link with the “_blank” attribute (examples using HTML helper and straight HMTL syntax)

    • @Html.ActionLink("linkText", "Action", new {controller="Controller"}, new {target="_blank"})
    • <a href="https://stackoverflow.com/questions/14509616/@Url.Action("Action", "Controller")" target="_blank">Link Text</a>
  2. Use Javascript to open a new window

    window.open("Link URL")

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)