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

Change the color of an oval at click in Java AWT -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -