Can i use radio button’s to select two different partial view, Without using Jquery?
Can i use radio button’s to select two different partial view, Without using Jquery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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
submitthe 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:
enjoy..