How to redirect to an action in asp.net mvc, using jquery?

0

How to redirect to an action in ASP.Net MVC, using JQuery?

I'm trying to do this:

 $("#Filtro").change(function () {
     @Url.Action("Answer");
 });
    
asked by anonymous 12.12.2018 / 00:06

1 answer

0

There are a few examples here on the site , and the command is window.location. href by passing the value of the example address:

$("#Filtro").change(function () {
    window.location.href = '@Url.Action("Answer")';
});

to be redirected to the page you want.

References

12.12.2018 / 00:20