title: how to set url for ajax page when using it in jQuery?
body: <p>In jQuery ajax function, you have to point out the url of Ajax page, for local development and remote server environment, the url is different. I think we should use a variable to store root path and then use it to set url. I use following line to get <code>rootpath</code> in backend.</p>
  
  <pre><code>rootpath=page.Request.ApplicationPath;
  </code></pre>
  
  <p>and pass the <code>rootpath</code> value to the frontend.</p>
  
  <pre><code>$.ajax({
      url:rootpath+'/AjaxPages/....',
      ....
  </code></pre>
  
  <p>But I found that in local development machine, it turns out that <code>rootpath='/UI'</code> (I use UI folder for my website files) but in server <code>rootpth='/'</code> So <code>url:rootpath+'/AjaxPages/....'</code> does not work here, I have to erase one slash to make it as <code>url:rootpath+'AjaxPages/....'</code></p>
  
  <p>How do you guys set the ajax page path?</p>