I want to Add Url.Action With Variable
<script type="text/javascript"> var a = Account; Var b = Index; window.location.href = '@Url.Action("a", "b")'; </script>
Hi ruben00000,
Use this script.
<script type="text/javascript"> window.location.href = '@Url.Action("Index", "Account")'; </script>
For more details refer
Show JavaScript alert after insert data and redirect to Index page using jQuery Ajax in ASP.Net MVC
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.