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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:47:48+00:00 2026-05-22T22:47:48+00:00

I am looking for detailed ASP.NET MVC examples which make extensive use of grouped

  • 0

I am looking for detailed ASP.NET MVC examples which make extensive use of grouped checkboxes (where multiple checkboxes can be selected, use case: choose the magazines you want to subscribe to with options such as “SI”, “Forbes”, “Money” etc) as well as grouped radio buttons (use case: at a bank choose either “savings” or “checking” account).

I have searched and found only scattered UI snipped but no complete MVC example which makes heavy use of these two UI elements and goes into detail on how the values from these elements are processed in the controller, captured in the model and persisted in the database.

Thanks,

  • 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-22T22:47:49+00:00Added an answer on May 22, 2026 at 10:47 pm

    The example here is for HTMLHelper for Checkbox Grouping

     public static class HtmlHelperGroup
    {
    static string container = @"<div id=""{0}"">{1}</div>";
    static string checkboxhtml = @"<input type=""checkbox"" name=""{0}"" value=""{1}"" {3} />{2}</br>";
    
    
    public static string CheckBoxGroup(this HtmlHelper obj, string name, List<SelectListItem> data)
        {
            StringBuilder sb = new StringBuilder();
            foreach (var content in data)
            {
                sb.Append(string.Format(checkboxhtml, name, content.Value,content.Text, content.Selected ? "checked" : string.Empty ));
            }
            return string.Format(container, "container_" + name, sb.ToString());
        }
    
    }
    
    
    <%=Html.CheckBoxGroup("account", new List<SelectListItem>() 
    {
     new SelectListItem() { Text="Checking", Value = "1"  },
    new SelectListItem() { Text="Saving", Value = "2"  }}) %>
    

    Hope this helps

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

Sidebar

Related Questions

How do I create an event on my custom asp.net control which can bubble
Is their a solution to generate an email template using an ASP.NET MVC View
I'm looking for the best way to log errors in an ASP.NET application. I
In my ASP.NET 3.5 Website which is published in shared hosting provider , I've
I've never done this, so I'm looking for detailed guidance. I'm trying to use
I'm looking for a bit of advice please. I'm developing a reasonably large ASP.NET
I am looking for a somewhat detailed explanation of which 3D Engine for Actionscript3
I am looking for a utility that can be used against .NET assemblies to
Looking at the Slickgrid examples and using Google Chrome, I'm setting a breakpoint on
Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following

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.