Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static MvcHtmlString RenderLabelFor<TModel, TValue> (
- this HtmlHelper html,
- Expression<Func<TModel, TValue>> value,
- object htmlAttributes
- ) where TModel : class
- {
- TagBuilder builder = new TagBuilder("td");
- builder.MergeAttributes(new RouteValueDictionary(attributes)); // to convert an object into an IDictionary
- builder.InnerHtml = LabelExtensions.LabelFor(html, value).ToString();
- return MvcHtmlString.Create(builder.ToString(TagRenderMode.Normal));
- }
- public static MvcHtmlString RenderLabelFor<TModel, TValue> (
- this HtmlHelper<TModel> html,
- Expression<Func<TModel, TValue>> value,
- object htmlAttributes
- )
- {
- ...
- }
Add Comment
Please, Sign In to add comment