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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:47:10+00:00 2026-06-03T19:47:10+00:00

I am stumped by the following: Here is my code: <div class=editor-field> <% foreach

  • 0

I am stumped by the following:

Here is my code:

                <div class="editor-field">
                    <% foreach (string Item in HR_Applications.Helper.GetOrdersForDay(DayOfWeek.Monday))
                       { %>
                    <%= Html.RadioButtonFor(model => model.MondayOrder,Item) %>
                    <%: Item %>
                    <br />
                    <%} %>
                </div>

This code renders my radiobuttons just fine. The problem that I have here is that I am worried users cannot select the radiobuttons by its text, but must click the buttons itself. How do I make the radiobuttons selectable by its text?

This control must be used: business requirement set out to me.

  • 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-06-03T19:47:13+00:00Added an answer on June 3, 2026 at 7:47 pm

    Set the id of your RadioButton and use a label with the for attribute.

    <label for="<%:Item.Name%>"><%:Item.Name%></label>
    <%= Html.RadioButtonFor(model => model.MondayOrder,Item, new {id = Item.Name}) %>
    

    Update

    If you’re not able to use a unique value from your model for the Ids then use a counter to keep track and append it to your Ids:

    <% 
    int counter = 0;
    foreach ( [...])
    {
       <label for="<%:Item.Name + counter%>"><%:Item.Name%></label>
    [...]
    counter++;
    
    }
    %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I'm stumped here - the following code throws an error Procedure or function
I am stumped by the following code: <b><i>First name *</b></i> : <input type=text name='<?php
I've got the following JAXB unmarshalling code which I'm trying to generalize. Here's what
I'm working on the following code, and a bit stumped why I'm getting an
I am a little bit stumped with the following problem and I am afraid
I'm following a couple of Pythone exercises and I'm stumped at this one. #
I've found myself somewhat stumped on how to deal with the following - For
I'm stumped here. I have an observable collection that holds business objects. I have
This one has me stumped. <div id=container> <div id=store></div> <div id=contact></div> </div> I'm looking
I have the following code in my Simulacion controller: [Authorize] public ActionResult Create() {

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.