❔ URL generating in MVC
Hello i need help with error that occurs when I'm generating URLs in ASP.NET MVC .NET Framework 4.6.2 application.
When URL is generated in 'a' tag using '@Url.Action("Index")?TK=4' it works -> outputs '/folder/controller/index?TK=4'.
But when the URL is passed in parameter to JS function, that does something and then redirects to that URL it will generate the URL wrong -> it generates '/controller/index?TK=4'. It is missing the '/folder/' at the start.
or just starting in the JS function:
So:
1) How can I generate it properly in JS ?
2) And what can be wrong with it ?
Note: All these pieces of code works well localy and on test (generates the URL with '/folder/'), but it doesn't work on production (doesnt generate '/folder/'), even though there is the same code. So the mistake might be in configuration ?
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.