How do I get a tooltip for my ActionLink?

2019-04-03 01:40发布

问题:

I think this should be simple, but I can't find the option!

How do I get a tool-tip/alt for my ActionLink??

<%=Html.ActionLink("New", "List", "FormSummary", new {childId = Child.Id}, new {Class = "action add"})%>

回答1:

It's html title attribute:

<%=Html.ActionLink("New", "List", "FormSummary", new {childId = Child.Id}, 
  new {Class = "action add", title="My Tooltip" })%>