2012-03-19 19 views

risposta

10

Specificare l'attributo 'target' HTML utilizzando htmlAttributes parameter. In Razor:

@Html.ActionLink("New Window", "Index", null, new { target= "_blank" }) 

Nella sintassi ASPX:

<%= Html.ActionLink("New Window", "Index", null, new { target= "_blank" }) %> 
+0

Fornire una soluzione in ASP.NET MVC. – SRV

+0

Ecco la stessa cosa nella sintassi di ASPX View: <% = Html.ActionLink ("Nuova finestra", "Indice", null, new {target = "_blank"})%> – McGarnagle

0

Impossibile ottenere le risposte su qui per lavorare. Ho dovuto usare

<%= Html.ActionLink("New Window", "Index", null, new { .target= "_blank" }) %> 

Questo ha funzionato per me. Era solo lo stupido periodo all'inizio del bersaglio che mancava.

Problemi correlati