I\'m building a web application targeting mobile devices (specifically iPhone and Android). I\'m building it using ASP.NET MVC and JQuery. On one page I have a cascading d
I've solved the issue and I'm just posting it in case others run into the same problem. It comes down to a me doing the very thing I hate, and that is hardcoded strings. In the case of this, the offending line is the AJAX url in hte post function. It's hardcoded to the root of the website, but when deployed (which was how I was testing it on a mobile device) the path changed.
SO to correct this, I've replaced the post line above with:
$.post('@Url.Content("~/DealerHome/Terms")' , { "ProgramId": programId },
Url.Content ensures that the correct relative path is used for the url.