I trying to get my link to open in a new tab (it must be in razor format):
<a href="@Url.Action("RunReport", "Performance", new { reportView = Model.ReportView.ToString() }, new { target = "_blank" })" type="submit" id="runReport" class="button Secondary">@Reports.RunReport</a>
This is not working though. Anyone know how to do this?
Just put in the <a> tag itself.
Just use the HtmlHelper
ActionLink
and set the RouteValues
and HtmlAttributes
accordingly.
@Html.ActionLink(Reports.RunReport, "RunReport", new { controller = "Performance", reportView = Model.ReportView.ToString() }, new { target = "_blank" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With