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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:18:15+00:00 2026-06-15T12:18:15+00:00

I have a few radio buttons <p>@Html.RadioButton(selected, img)img @Html.RadioButton(selected, input)input @Html.RadioButton(selected, script)script @Html.RadioButton(selected, link)link

  • 0

I have a few radio buttons

    <p>@Html.RadioButton("selected", "img")img
    @Html.RadioButton("selected", "input")input
    @Html.RadioButton("selected", "script")script
    @Html.RadioButton("selected", "link")link
    @Html.RadioButton("selected", "form")form</p>

and I want to use twitter bootstrap’s btn-group, buttons-radio as a style as a replacement for these radio buttons, the code i attempted to add was

    <div class="btn-group" data-toggle="buttons-radio">
    <button type="button" class="btn" name="selected" value="a">a</button>
    <button type="button" class="btn" name="selected" value="img">img</button>
    <button type="button" class="btn" name="selected" value="input">input</button>
    <button type="button" class="btn" name="selected" value="script">script</button>
    <button type="button" class="btn" name="selected" value="link">link</button>
    <button type="button" class="btn"  name="selected" value="form">form</button>
    </div>

in my controller i’m using the I’m using the FormCollection as a way of getting the value from the checked radiobutton, but i would like to use the bootstrap css instead of having the plain @Html.radiobutton.

            string selectedTechnology = form["selected"];
            List.UrlType = selectedTechnology;

I have a feeling that this is not the correct way to do it, since the helper probably works with the formcollection and it has no idea what the bootstrap css buttons are but if there is a way to implement it, that’d be great.

UPDATE:

So… here is the solution I was looking for

radio buttons using bootstrap css

<div id="radios" class="btn-group view-opt-btn-group" data-toggle="buttons-radio">
<button type="button" class="btn" name="option-a" value="a">a</button>
<button type="button" class="btn" name="option-img" value="img">img</button>
<button type="button" class="btn" name="option-script" value="script">script</button>
<button type="button" class="btn" name="option-link" value="link">link</button>
<button type="button" class="btn" name="option-form" value="form">form</button>
<input type="hidden" name="option" value="0" />
</div>

i created a jscript click function

<script type="text/jscript">
    $("body").find("#radios").children().each(function () {
        $(this).bind('click', function () {
            $("input[name=option]").val(this.value);
        });
    });
</script>

inside my controller I used the FormCollection to add the selected button to my model

        string selectedTechnology = form["option"];
        whiteList.UrlType = selectedTechnology;

hopefully this helps.

  • 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-15T12:18:16+00:00Added an answer on June 15, 2026 at 12:18 pm

    So… here is the solution I was looking for

    radio buttons using bootstrap css

        <div id="radios" class="btn-group view-opt-btn-group" data-toggle="buttons-radio">
        <button type="button" class="btn" name="option-a" value="a">a</button>
        <button type="button" class="btn" name="option-img" value="img">img</button>
        <button type="button" class="btn" name="option-script" value="script">script</button>
        <button type="button" class="btn" name="option-link" value="link">link</button>
        <button type="button" class="btn" name="option-form" value="form">form</button>
        <input type="hidden" name="option" value="0" />
        </div>
    

    i created a jscript click function

        <script type="text/jscript">
            $("body").find("#radios").children().each(function () {
                $(this).bind('click', function () {
                    $("input[name=option]").val(this.value);
                });
            });
        </script>
    

    inside my controller I used the FormCollection to add the selected button to my model

                string selectedTechnology = form["option"];
                whiteList.UrlType = selectedTechnology;
    

    hopefully this helps.

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

Sidebar

Related Questions

I have a few radio buttons in a group, one of them being: <input
I have several text input fields in my page, and few radio buttons. Now
I have a few radio buttons that belong to the same category, but I
I have a form that is made up of lots of radio buttons and
I have main activity which contains few radio buttons. Their is one button named
I have a few radio buttons that I'm styling with PNG background images, using
I have this piece of code which represents a few radio buttons. <label>Tipologia Pdv:
I have a Wordpress form with a Radio Button input label and value that
I have made a Win Form and have a few controls like checkboxes, radio
I have a few radio buttons, and when I select one of them, I

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.