c# - Is it possible to create a custom ASP.NET MVC strongly typed HTML Helper? -


I was wondering if it is possible to make a custom firmly typed HTML helper in ASP.NET MVC 2? Creating a regular (not helpful-vigorous type) helper is straightforward, but I'm having trouble making strongly typed versions. For example, I want to create a DatePickerFor HTML Assistant ...

Any guides or snippets will be highly appreciated, thanks in advance! Jp

OK, I understood it (and it was very straightforward ...). I am posting in case any other person is involved in this question.

  public static string date picturefront & lt; TModeel, TProperty & gt; (This HtmlHelper & lt; TModeel & gt; HTMLHelper, expression & lt; Func & lt; TModeel, TProperty & gt; & gt;; Expression) where TModel: class {var inputName = ExpressionHelper.GetExpressionText (expression); Return HTML Helper Dot Picture (Input); }  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -