New window opens on click of actionLink

后端 未结 6 1331
时光说笑
时光说笑 2021-01-05 20:18

I have a requirment to invoke a controller method from the view page. On click of the link below the method should be invoked.

@Html.ActionLink(item.InvoiceN         


        
6条回答
  •  天涯浪人
    2021-01-05 21:02

    try passing _self instead of _blank or alternatively passing null instead of , new { target = "_blank" }

    i.e. @Html.ActionLink(item.InvoiceNumber, "SendPdfStatement", "Invoice", new { item.InvoiceNumber }, null )

    or leave off the new { target = "_blank" } all together

提交回复
热议问题