boycoto

boycoto

  • NA
  • 147
  • 125.3k

Unable to Load Partial View

Oct 7 2013 9:05 PM
I am currently stuck with loading a partial view using a radio button, can anyone help me. Below is my jquery.
<script type="text/javascript" language="javascript">
    $('input:radio[name=CreateMenu]').change(function () {
        var url = '';
        if ($(this).val() == "CreateMenu") {
            url = '@Url.Action("MenuEntry", "EnvironmentMaintenance")';   
        }
        else if ($(this).val() == "CreateSubMenu") {
            url = '@Url.Action("SubMenuEntry", "EnvironmentMaintenance")';
        }
        $('#CreateMenuPanel').load(url);
    });
</script>

Answers (2)