Skip to content Skip to sidebar Skip to footer

Navigate From Html Page To Mvc View

I have a home.html page from where I have to redirect the user to a View in mvc on button click. How can I do that ?

Solution 1:

Use some Jquery code on button click as shown :

$('#buttonid').on('click',function(){
  window.location.href = "/controllername/actionname";
});

Solution 2:

By following code you can do this

$('#buttonid').on('click',function(){
  $(location).attr('href','/controllername/actionname');
});

Post a Comment for "Navigate From Html Page To Mvc View"