How to have a a razor action link open in a new tab?

前端 未结 10 1694
甜味超标
甜味超标 2020-12-14 05:41

I trying to get my link to open in a new tab (it must be in razor format):

    

        
10条回答
  •  [愿得一人]
    2020-12-14 05:49

    Looks like you are confusing Html.ActionLink() for Url.Action(). Url.Action has no parameters to set the Target, because it only returns a URL.

    Based on your current code, the anchor should probably look like:

    
         @Reports.RunReport
    
    

提交回复
热议问题