How to display text in an MVC view with htmlattrbutes

前端 未结 3 1351
南方客
南方客 2021-01-26 11:31

I have the following code :

@Html.ActionLink(\"Hello \" + User.Identity.GetUserName() + \"!\", 
\"Manage\", \"Account\", 
routeValues: null, 
htmlAttributes: new         


        
3条回答
  •  深忆病人
    2021-01-26 12:14

    If i understand correctly,you want to show the text inside your link without an achor tag, but with your html attributes (title attributes)

    Try this

    Hello @User.Identity.GetUserName() !
    

提交回复
热议问题