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

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -