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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:32:03+00:00 2026-05-30T03:32:03+00:00

I adapted this code Has anyone implement RadioButtonListFor<T> for ASP.NET MVC? for combobox. But

  • 0

I adapted this code Has anyone implement RadioButtonListFor<T> for ASP.NET MVC? for combobox.

But I’ve a small problem is some case(which appears with checkbox/radiobutton:

If The item I want to bind is in a list, I get weird names:

//Here I've some for loop
@Html.CheckBoxListFor(m => m.Variables[i].Values[j].Triggers)

And I got:

<input id="Variables.get_Item(value(ASP._Page_Areas_Advertiser_Views_Campaign_ValueDependency_cshtml+&lt;>c__DisplayClass2).i).Values.get_Item(value(ASP._Page_Areas_Advertiser_Views_Campaign_ValueDependency_cshtml+&lt;>c__DisplayClass4).j).Triggers_103" name="Variables.get_Item(value(ASP._Page_Areas_Advertiser_Views_Campaign_ValueDependency_cshtml+&lt;>c__DisplayClass2).i).Values.get_Item(value(ASP._Page_Areas_Advertiser_Views_Campaign_ValueDependency_cshtml+&lt;>c__DisplayClass4).j).Triggers.ListItems[0].Selected" type="checkbox" value="true" />

How to avoid this name?

EDIT:
The list of item is dynamic and has to be loaded from the controller:

pulic ActionResult DoMyThing(){
   _dataStore.MakeThings();
   ....

   MyModel model = new MyModel{SelectedId=5, AvailableObjects= _aPreviouslyLoadedList};
   return View(model);
}
  • 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-30T03:32:05+00:00Added an answer on May 30, 2026 at 3:32 am

    I just discovered a VERY good solution (for my needs) regarding checkboxes, dropdownlists, radiobuttons, etc.

    Check out this post (link on bottom to code on codeplex -> source -> download latest):

    Adding Rich Selector Support for MVC by Matt Hidinger

    Note that the post indicates you need three (3) extension files to get it to work, but there are also some other helper extensions that are needed (DelimitedStringHelper.cs, HtmlFormHelper.cs, ReflectionHelper.cs and StringHelper.cs are the other ones you need).

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

Sidebar

Related Questions

Basically my problem is that i've adapted a piece of code found here http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/62e70670-f306-4bb7-8684-549979af91c1
I'm using Moq to help in testing my ASP.NET MVC2 application. Problem: ArgumentException was
I'm stuck trying to implement a single server queue. I've adapted some pseudocode from
This little piece of code has been a staple in a bunch of my
Take the code below, adapted from this question : //Borrowed from another question because
The code below is adapted from this answer function MessageClass() { var self =
Let's look at this code: IList<IHouseAnnouncement> list = new List<IHouseAnnouncement>(); var table = adapter.GetData();
This is an adapted version of a question from someone in my office. She's
Using an adapted version of jquery.inplace.js for some page creation and use an OBDC
(This was meant to be a general hypothetical question, me whining that .NET was

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.