What happened to Html.Mailto from MVC preview to final?
-
16-09-2019 - |
Question
In some of the previews, there was an HTML-helper method for building mailto-links.
http://blog.wekeroad.com/2007/12/05/aspnet-mvc-preview-using-the-mvc-ui-helpers/
I am not able to find that in the final release. Am I missing something?
Solution
I know they removed some of those HTMLHelper
s from the final version. That might be one of them. Previews are generally notorious for changes. You might want to look at the MvcFutures project.
http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471
OTHER TIPS
Check the MvcFutures assembly. I don't remember seeing it in either of the Release Candidates, but I believe it's in Futures. Source for 1.0 (and futures) available at http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471.
Quite a few features that were in ASP.NET MVC were moved into MVC Futures for one reason or another. Most was due to incompleteness before the RTM. However I don't know why Html.Mailto would have been left out.
You can use @Html.DisplayFor
such as @Html.DisplayFor(modelItem => Model.emailAddress)
and it will produce an email link.