KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
New to MVC and have been running through the tutorials on the asp.net website. They include an example of a custom html helper to truncate long text displayed in a table. Just wondering what other solutions people have come up with using HTML helpers and if there are any best practices or things to avoid when creating/using them. As an example, I was considering writing a custom helper to format dates that I need to display in various places, but am now concerned that there may be a more elegant solution(I.E. DataAnnotations in my models) Any thoughts? EDIT: Another potential use I just thought of...String concatenation. A custom helper could take in a userID as input and return a Users full name... The result could be some form of (Title) (First) (Middle) (Last) depending on which of those fields are available. Just a thought, I have not tried anything like this yet.
Tags (comma-separated)
Save Edits
Cancel