I developed a site in asp.net. In my site, I have an ajax post which worked when I ran the site locally.
After I publish my site, it looks like the url for ajax post is changed.
I want to align the URL that when running the site locally will be the same as when the site is published
I published the site under folder name ResourceManager (it also the site name)
My ajax URL before publish the site
URL= "/testbed/ConnectTesbedToResource/";\\(<controller_name/method_name>)
after publish the site its NOT working and I need to change the URL to
URL = /ResourceManager/TestBed/ConnectTesbedToResource/;
How I can make sure that the URL will be the same for local run and for publish run?
I tried to change the URL to relative path with ~
(~/testbed/ConnectTesbedToResource/
) and it also didn't work.
How can I make that after publish I will have same URL for jQuery post request?