Estoy intentando abrir una nueva ventana usando url.Action. Y la nueva URL de la ventana está fuera de este proyecto actual (sitio web externo).url.Action open link in new window on ASP.NET MVC Página
Aquí hay dos cosas que tengo que hacer:
- NECESITO para abrirlo en una nueva ventana.
- Va a
http://localhost:57391/Home/http:/www.yahoo.com
en lugar de directamente a Yahoo.
Aquí está mi código:
<tr >
<td>
<a href="<%= Url.Action("http://www.yahoo.com") %>"><span>Go to Yahoo</span></a>
</td>
</tr>
toda la razón, como nota al margen: en caso de que se trataba de una acción del controlador real: " target="_blank"> could have been used of course! The Url.Action only fills in the href part, the rest of the anchor is still free to decorate with whatever attributes you'd like. –
Or '@Html.ActionLink("New report", "New", "Report", null, new {target = "_blank"})' Source: http://stackoverflow.com/questions/7790355/asp-net-mvc-3-controller-action-and-open-new-window – Coops