开发者

Add a line break for a long link title within Html.ActionLink MVC2

开发者 https://www.devze.com 2023-01-31 16:49 出处:网络
I have a long title and need to add something like a line break within the ActionLink. I\'ve tried \\r\\n as well as System.Environment.NewLine...all with no success.

I have a long title and need to add something like a line break within the ActionLink. I've tried \r\n as well as System.Environment.NewLine...all with no success.

<%=Html.开发者_如何转开发ActionLink("Long title goes here", "index", "Overview")%>


You may try something like this:

<a href="<%= Url.Action("index", "overview") %>">
    Long title first line<br/>
    Long title second line<br/>
    Long title third line
</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消