c# - Open Partial View on button click inside a modal asp.net mvc? -


    function simpleajaxcall() {         $.ajax({             url: "/account/register",             success: function (result) {                 $("#modalsignupbody").html(result);                 $('#signup').modal({                     backdrop: 'static',                     keyboard: true                 }, 'show');             }         });     } 

button call:

<button id="signupbtn" class="btn btn-warning" onclick="simpleajaxcall();">sign up</button> 

modal:

  <div class="modal fade" id="signin" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true">     <div class="modal-dialog">         <div class="modal-content">             <div class="modal-header">                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>                 <h4 class="modal-title" id="mymodallabel">sign in</h4>             </div>             <div class="modal-body">               </div>             <div class="modal-footer">                 <button type="button" class="btn btn-default" data-dismiss="modal">close</button>                 <button type="button" class="btn btn-primary">save changes</button>             </div>         </div>     </div> </div> 

its not working able go inside controller function not getting result in below code:

 success: function (result) { 

my controller:

   [httpget]     [allowanonymous]     public actionresult register()     {         return partialview("_register");     } 

it obvious you're receiving sort of error, try check "network" tab of firebug or other tool using right now.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -