I have a JavaScript function like this in my ASP.NET MVC 3 application.
function Foo()
{
var url = "@Url.Action("MyAction", "MyController")";
alert(url);
}
I am confused why the above code works . I expected to escape @Url.Action(...)inside the tags <%=?
source
share