I have a model class, with a property like this:
[Display(Name = \"Phone\", Description=\"Hello World!\")]
public string Phone1 { get; set; }
You can always create your own custom extension like this:
public static MvcHtmlString ToolTipLabel (string resourceKey, string text, bool isRequired, string labelFor = "", string labelId = "",string className="")
{
string tooltip = string.Empty;
StringBuilder sb = new StringBuilder();
if (!string.IsNullOrEmpty(resourceKey))
{
var resources = GetAllResourceValues();
if (resources.ContainsKey(resourceKey))
{
tooltip = resources[resourceKey].Value;
}
}
sb.Append("", text);
}
else
{
sb.AppendFormat(">{0}", text);
}
return MvcHtmlString.Create(sb.ToString());
}
and can get it in view like this:
@HtmlExtension.ToolTipLabel(" "," ",true," "," "," ")