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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:37:41+00:00 2026-05-11T18:37:41+00:00

I got the following Html: <div class=horizontalRadio> <label for=SearchBag.DisplayTypeChips id=DisplayTypeChipsLabel> <%=ViewData.Model.T9nProvider.TranslateById(CommonWeb.Chips)%> </label> <%=Html.RadioButton(displayType, DisplayTypes.Chip,

  • 0

I got the following Html:

<div class="horizontalRadio">
    <label for="SearchBag.DisplayTypeChips" id="DisplayTypeChipsLabel">
        <%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Chips")%>
    </label>
    <%=Html.RadioButton("displayType", DisplayTypes.Chip,
        Model.DisplayType.Equals(DisplayTypes.Chip.ToString(), StringComparison.InvariantCultureIgnoreCase),
        new { @id = "SearchBag.DisplayTypeChips" })%>
</div>
<div class="horizontalRadio">
    <label for="SearchBag.DisplayTypeGrid" id="DisplayTypeGridLabel">
        <%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Grid")%>
    </label>
    <%=Html.RadioButton("displayType", DisplayTypes.Grid,
       Model.DisplayType.Equals(DisplayTypes.Grid.ToString(), StringComparison.InvariantCultureIgnoreCase),
        new { @id = "SearchBag.DisplayTypeGrid" })%>
</div>

Whenever Model.DisplayType is “grid”, everything is fine; the second button is checked.
When the value is “chip”, nothing is checked. In the debugger, I can see that Model.DisplayType.Equals(DisplayTypes.Chip.ToString()) is true. When I change the name of the buttons to something different, it works too.
Happens I don’t want to change the name because this is the name that makes sense. This is the name I’m using throughout my application …

Any ideas WHY this name is evil?

  • 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-11T18:37:41+00:00Added an answer on May 11, 2026 at 6:37 pm

    There is an issue in ASP.NET MVC with regards to having a property on your model with the same name as the name of a “grouped” element (like a select or a radio group).

    See http://weblogs.asp.net/ashicmahtab/archive/2009/03/27/asp-net-mvc-html-dropdownlist-and-selected-value.aspx for details.

    It might be this, it’s worth trying.

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

Sidebar

Related Questions

I got the following code and im using twitter bootstrap. <div class=span10> <div class=span2>@Html.Label(lblUsername,
I've got the following View <% Using Html.BeginForm()%> <%: Html.ValidationSummary(True) %> <div class=displayright> <h3>
I got a buttons row in the following html: HTML : <div class=buttons> <div><input
I got the following html: <div class=inputContainer> <div class=inputPlaceholder>Hello world</div> <input type=text class=input />
I've got the following html: <html> <body> <div id=note1 class=note> <div class=note-header>Note</div> <div class=note-content></div>
Hi I've got something like the following HTML: <div class="container"> <img src="first.png" /> <img
Ive got the following html setup: <div id=div1> <div id=content1>blaat</div> <div id=content1>blaat2</div> </div> it
I got the following very basic template: <html> <head> </head> <body> <div> <!-- Using
I've got the following elements inside a Div element: <div class=section> <%= InventoryGoods.Metadata.PluralLabel %>
On my page I got the following user control: <div class=editFormDialog style=display: none; font-size:

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.