I need to send an id to my MVC controller method, which is sent from a json call. At the end, I need to refresh the screen. This is working fine:
window.location.href = '/Reports/SpendingByCategoryByMonth/' + categoryId;
However, I need to send more than one parameter now. So, my controller methods takes two parameters named, and I try call my controller like this:
window.location.href = '/Reports/SpendingByCategoryByMonth/categoryId=' + categoryId + '&subCategoryId=' + subCategoryId;
But I get the error:
A potentially dangerous Request.Path value was detected from the client (&).
Is there a better way to do this - or, how do I fix this?