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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:52:01+00:00 2026-05-30T00:52:01+00:00

Can i use radio button’s to select two different partial view, Without using Jquery?

  • 0

Can i use radio button’s to select two different partial view, Without using Jquery?

  • 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-30T00:52:03+00:00Added an answer on May 30, 2026 at 12:52 am

    yes and no. a partial can only be loaded (after initial page load) via ajax, so a partial page refresh isn’t possible without using ajax. however, you could submit the selected radio button (via javascript) to the controller action and then determine inside the controller which radio button had been selected. It would then just be a case of selecting the appropriate view.

    As I said, you can’t go down the partial route without ajax in the mix, so the answer is no. also, you’d still have to use javascript in order to use the radio button in the submit, in which case, an ajax solution might be worth thinking about.

    [edit] with deference to Splash-X, here’s a quick work up of the hidden div scenario:

    @*use either @Html.RenderPartial() or @Html.RenderAction() as required*@
    
    <div id="developerDiv" style="display: none">
        This is the developer stuff, in reality, 
        this would be populated as such @*@Html.RenderPartial("DeveloperPartial")*@
    </div>
    <div id="testerDiv" style="display: none">
        And here we have the testers, again, 
        this would be populated as such @*@Html.RenderPartial("TestersPartial")*@
    </div>
    <div>
        Developer :@Html.RadioButton("team", "developer", new { onclick = "showResult(this)"}) 
        Tester :@Html.RadioButton("team", "tester", new { onclick = "showResult(this)"})
    </div>
    <div id="partialContainer"></div>
    
    <script type="text/javascript">
        function showResult(radio) {
            var selected = radio.value;
            if (selected == "developer")
                document.getElementById("partialContainer").innerHTML 
                    = document.getElementById("developerDiv").innerHTML;
            else if (selected == "tester")
                document.getElementById("partialContainer").innerHTML 
                    = document.getElementById("testerDiv").innerHTML;
        }
    </script>
    

    enjoy..

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

Sidebar

Related Questions

I want to use jQuery to get the checked radio button out of a
How can i retrieve the text of a dynamically created radio button selected by
Is there some event for a radio button being selected? I know I can
How can I show and hide the following DIVs when radio button clicked? <form
I'm trying to use a radio button as a click function: $(input[type=radio]).click(function(){ and I
Possible Duplicate: Find out if radio button is checked with JQuery? Hi, i want
I'm trying to find an MVC (razor) solution where I can use radio buttons
I am wondering whether you can make a button, function like a HTML Radio
How to detect which radio button was clicked in h:selectOneRadio using javascript or maybe
I know I can use something described here: How can I know which radio

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.