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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:51:44+00:00 2026-05-21T21:51:44+00:00

I am using RadioButtonFor to display a list of selectable items. It’s part of

  • 0

I am using RadioButtonFor to display a list of selectable items. It’s part of a wizard I am using, and the last step of the wizard is a summary for the user to confirm their submission. I have everything working except for the RadioButtonFor. My summary contains something pretty basic showing what the user input.

Example:

...

<div>Summary</div>

<div>Please confirm the information you are submitting.</div>

<div>First Name: @Model.FirstName</div>

...

The relevant portion of my model:

public CategoryList Category { get; set; }

public enum CategoryList
{
    Category1
    Category2
    Category3
}

The relevant portion of my page (wizard step with RadioButtonFor):

...

@Html.LabelFor(m => m.Category, new { @class = "CLASS" })
@Html.ValidationMessageFor(m => m.Category)

<div>
@Html.RadioButtonFor(m => m.Category, "Category1")
<span>NEW!</span>Category 1. This Category is for BLAH BLAH BLAH ...
@Html.RadioButtonFor(m => m.Category, "Category2")
Category 2. This Category is for BLAH BLAH BLAH ...
@Html.RadioButtonFor(m => m.Category, "Category3")
Category 3. This Category is for BLAH BLAH BLAH ...
</div>
...

The relevant portion of my page (wizard summary step containing RadiouButtonFor):

<div>@Model.Category</div>

The above simply displays the actual name in Category List, say “Category1” if the user selected Category 1, so I know I have the enum working correctly. However, I want the description to be, well, more descriptive. Say that I want Category1 to say “Category 1. This category is for BLAH BLAH BLAH” as well as to maybe put a around “Category 1.” So that it is displayed in RED. The actual name I use in the enum is three words, and contains two underscores, so it’s not very UI friendly to have “Word1_Word2_Word3” in there, which is what displays in the summary.

To be more precise, if you look at the relevant portion of the page above which contains the RadioButtonFor, I include text for the radio button which shows to the user on the UI. The text that appears there is what I want to appear in the summary.

I tried using the following:

<div>@Model.Category.CategoryList</div>

but it throws an error (…does not contain a definition for “CategoryList” and no extension method “CategoryList” accepting a first argument of type … could be found (are you missing a using directive or assembly reference”). I’ve spent hours on the googlenet, and could not find anything (quite possibly because I am not formulating good search terms).

Any thoughts? Is this possible, or is there something alternative I can do to achieve what I am looking for?

Again, I appreciate any help and sorry if re-asking in a different way is against policy.

  • 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-21T21:51:44+00:00Added an answer on May 21, 2026 at 9:51 pm

    You can store the descriptions in a Dictionary<CategoryList, string> somewhere and write @Html.Raw(YourDictionary[Model.Category])

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

Sidebar

Related Questions

Using C# (the .NET framework), I'm looping through all the TimeZones and their AdjustmentRules...
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Hi fairly new to using MVC radio buttons. I have some code: @Html.RadioButtonFor(modelItem =>
Using Play 2.0.1 I defined the following route: GET /demo/list controllers.Demos.listDemos(page: Int ?= 0,
Using LINQ on collections, what is the difference between the following lines of code?
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
Using Nunit, I want to be able to write a test fixture that will
Using a restful resource in Rails, I would like to be able to insert
Using Flex 3, I would like to take an image snapshot such as this:

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.