0

I need to create a link with caption "next + →". Is there any way to create Html.ActionLink without caption encoding?

2
  • I'm not sure what you mean? You mean setting the "title" attribute? Commented Dec 13, 2010 at 18:37
  • Yes, I mean anchor title attribute Commented Dec 13, 2010 at 18:41

1 Answer 1

2

I've run into this issue and didn't find an easy way around it. Sadly the title parameter is a simple System.String instead of an MvcHtmlString.

When my team needed unencoded titles, we just fell back to anchor tags.

<a href="Url.Action(/* etc. */)">raw html</a>
Sign up to request clarification or add additional context in comments.

1 Comment

Another option I see is to create ActionLink extension method that retrieves HtmlString as title

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.