New window opens on click of actionLink

后端 未结 6 1330
时光说笑
时光说笑 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:18

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

    So basically that last parameter is your html attributes, if you don't need it to open in a new window...that's the only attribute in there so just pass null for the whole parameter.

提交回复
热议问题