Html.ActionLink with a specified HTML id?

前端 未结 4 868
青春惊慌失措
青春惊慌失措 2021-02-02 06:47

I\'d like to give the like generated with an Html.ActionLink an HTML id so I can change the CSS depending on where I am. I have a MasterPage with a set

4条回答
  •  生来不讨喜
    2021-02-02 07:23

    Try this:

    <%: Html.ActionLink("Some View", "Index", "controller", null, new {id="something}")%>
    

提交回复
热议问题