I've a view page in which there's an HTML ActionLink. Now on click of that action link, i want to open a new popup window without closing the previous one. In this new popup window i want to show my existing view page. please provide me a better solution.
Asked
Active
Viewed 1.6k times
2 Answers
10
Specify the HTML 'target' attribute using the htmlAttributes
parameter. In Razor:
@Html.ActionLink("New Window", "Index", null, new { target= "_blank" })
In ASPX syntax:
<%= Html.ActionLink("New Window", "Index", null, new { target= "_blank" }) %>

McGarnagle
- 101,349
- 31
- 229
- 260
-
Please provide me solution in ASP.NET MVC. – SRV Mar 20 '12 at 10:25
-
Here's the same thing in ASPX View syntax: <%= Html.ActionLink("New Window", "Index", null, new { target= "_blank" }) %> – McGarnagle Mar 20 '12 at 18:09
0
Could not get the answers on here to work. I had to use
<%= Html.ActionLink("New Window", "Index", null, new { .target= "_blank" }) %>
This worked for me. It was just the silly little period at the beginning of target that was missing.

Harry Binnendyk
- 141
- 1
- 2