I have two registration types. One is Individual and second as Business type registration. I have two radio buttons. I have used Html Helper for this. When I click on first radio button the individual partial view should be loaded. How can I achieve this using ap.net mvc4 razor
-
1This question is very broad and probably opinion-based. It also doesn't show any research effort, any code samples or outline any problems that you ran in to. The short answer is that you should use a javascript framework (Angular is my choice) and WebApi. Where to go from there depends on your data and your business logic requirements.Rowan Freeman– Rowan Freeman2014-05-12 06:08:07 +00:00Commented May 12, 2014 at 6:08
Add a comment
|
1 Answer
Use AJAX to make a request to the controller within a radio button's change function. In the controller action with an HttpPost or HttpGet decoration, you would return a partial view. Within your ajax response you would recieve it as dataType:'html' and place the result inside of a div.
Google is your best friend when you're learning.