Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3350718
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:49:15+00:00 2026-05-18T01:49:15+00:00

Some thoughts about writing custom html helpers. In our project everywhere you can find

  • 0

Some thoughts about writing custom html helpers.

In our project everywhere you can find the html helpers used like this.

@Html.TextBoxFor(m => m.ApplicationSettings.ApplicationName, new { @class = "inp" })

We append the css class “inp” to almost every input type.
So what I’m doing is that Im creating extended html helpers that does this for me.

@Html.ExtendedTextBoxFor(m => m.ApplicationSettings.ApplicationOwnerCompanyName)

I’m also creating Html helpers for our blocks of html code that are used over and over through the project.
Example

@Html.ExtendedNotification(Model.FormPostResult)

Which renders error/success messages after a form has been posted

This means that the Html helper extensions are depending on the css and markup.
Is this good or bad?

Am I overusing Html helpers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:49:16+00:00Added an answer on May 18, 2026 at 1:49 am

    This means that the Html helper extensions are depending on the css and markup

    That’s exactly what HTML helpers are meant for, so yes this is a very good use of helpers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find myself writing code like this when I want to repeat some execution
Need some help gathering thoughts on this issue. Our team is moving ahead with
I am writing some custom generic data structures. How can I ensure that the
Just would like some thoughts of what you think about my strategy to learn
We have some performance problems with one of our applications. I thought about using
I'm writing a presentation about rule engine technology, specifically JBoss Drools. What are some
I looks like I may need to embark on some cross-platform project and part
This was my first go at writing some jQuery code completely from scratch, so
Today, a fellow team member checked-in some code that looked like this var query
I have some thoughts on the design of the commanding part in CQRS. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.