htmlhelper   33

The MVC platform – the HtmlHelper class (part I) : LA.NET [EN]
After a long break, it’s time to go back to the MVC framework study. And today I’ll start from where I’ve stopped last time: the helpers. Today, I’m going to start talking about the HtmlHelper class which has lots of methods that you can use on your views for generating HTML.
mvc  htmlhelper 
september 2019 by vegarev
c# - Unit testing HtmlHelper extension method fails - Stack Overflow
public static class MvcHelper
public static HtmlHelper<TModel> GetHtmlHelper<TModel>(TModel inputDictionary)
var viewData = new ViewDataDictionary<TModel>(inputDictionary);
var mockViewContext = new Mock<ViewContext> { CallBase = true };
mockViewContext.Setup(c => c.ViewData).Returns(viewData);
mockViewContext.Setup(c => c.HttpContext.Items).Returns(new Hashtable());

return new HtmlHelper<TModel>(mockViewContext.Object, GetViewDataContainer(viewData));

public static IViewDataContainer GetViewDataContainer(ViewDataDictionary viewData)
var mockContainer = new Mock<IViewDataContainer>();
mockContainer.Setup(c => c.ViewData).Returns(viewData);
return mockContainer.Object;
DisplayHelper  asp.netmvc  test  HtmlHelper 
july 2015 by tulbox
ASP.NET MVC Helper - MoreLessText
James Curran announces a useful ASP.NET MVC helper that truncates text and adds a link to display the remaining text via jQuery.
nuget  aspnetmvc  htmlhelper  from delicious
may 2014 by jongalloway
Practical Recursion in ASP.NET Web Pages with WebMatrix
Interesting post from Mike Brind looking at the use of recursive functions and Razor helpers in ASP.NET Web Pages.
razor  aspnetwebpages  htmlhelper  from delicious
february 2013 by jongalloway
ASP.NET MVC–How to show asterisk after required field label
Gunnar Peipman blogs about an HTML helper for ASP.NET MVC that shows an asterisk after the label for each required field.
aspnetmvc  htmlhelper  validation  mvc3  from delicious
june 2012 by jongalloway
c# - MVC3 HtmlHelpers using Generics and LINQ - Stack Overflow
讲到如何对HtmlHelpers进行扩展的问题。可以参考一下地说。2012年5月22日 22:23:22
mvc3  helper  htmlhelper  extension  generic  stackoverflow 
may 2012 by bnpysse
MVC Data URI HTML Helper
Dean Hume blogs about an HTML Helper which creates Data URIs from images if the user's browser supports them.
aspnetmvc  datauri  htmlhelper  mvc3  from delicious
november 2011 by jongalloway

related tags

api  asp.mvc  asp.netmvc  aspnetmvc  aspnetwebpages  bootstrap  castle  classes  concept  css  datauri  delicious-export  development  displayhelper  displayname  dropdown  dropdownlist  enum  enums  extension  fluent  generic  helper  html  monorail  moq  mvc  mvc2  mvc3  mvc4  mvc5  mvctoolkit  nuget  nvelocity  razor  required  rest  routes  select  stackoverflow  template  test  textboxfor  tools  twitter  uploadify  uri  url  urlhelper  usage  utilities  validation  velocity  web 

Copy this bookmark: