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 6092003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:23:34+00:00 2026-05-23T12:23:34+00:00

How comethis does not work? I am trying to add a new HTML attribute

  • 0

How comethis does not work?
I am trying to add a new HTML attribute to the EditorFor.
@Html.EditorFor(model => model.Name, new { data_autocomplete=”/index/QuickSearch”})

  • 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-23T12:23:35+00:00Added an answer on May 23, 2026 at 12:23 pm

    Unfortunately the EditorFor helper doesn’t include the html attributes parameter that the other helpers do. This is because you can make custom editor templates (see http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html for an outdated MVC2 example), so it doesn’t make sense to have html attributes, as there could be many HTML tags in the template.

    Your best bet is to either write your own helper extension method OR, if your editor is always, for example, a TextBox, use TextBoxFor().

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

Sidebar

Related Questions

How come this does not work: <xsl:with-param name=message> <xsl:attribute name=select> <xsl:text>'Alla koder kopplade till
I have read somewhere that the C++ standard does not allow something like enum
How come this doesn't work (operating on an empty select list <select id=requestTypes></select> $(function()
Reading existing code at work, I wondered how come this could work. I have
I'm trying to have different pictures on every one of my pages built on
I'm not much of a database guru so I need some help on a
I have the following code: private SetMultimap<String, Dynamic> dynamicFields = TreeMultimap.create(Ordering.natural(), new Comparator<Dynamic>() {
I'm a Python newbie. How come this doesn't work in Python 3.1? from string
How come this doesn't rise Attribute error? function object doesn't have any of the
how come this java switch statement keeps telling me my statements are not statements

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.