title: passing parameters containing # in URL for calling webservice using AJAX
body: <p>I am calling one of my <strong>webservice</strong> in which im sending some paramters like key,id,subject line,etc</p>
  
  <pre><code>example:
   http://asv.msdasmafetrix.net/public/mobile.ashx?method=getparsedtemplate_contactinfo&amp;emailbody='" + emailbody + "'&amp;subjectline='" + subjectline + "'&amp;contactemailid=" + contactemailid + "&amp;id=" + jasondata.id + "&amp;key=" + jasondata.key
  </code></pre>
  
  <p>but,in parameters like subject and emailbody <code>#</code> variable is present due to which it is breaking my code.and giving me undefined value.i have even tried encodeURI.got no success though.</p>
  
  <p>my code is:</p>
  
  <pre><code>var uri="http://asv.msdasmafetrix.net/public/mobile.ashx?method=getparsedtemplate_contactinfo&amp;emailbody='" + emailbody + "'&amp;subjectline='" + subjectline + "'&amp;contactemailid=" + contactemailid + "&amp;id=" + jasondata.id + "&amp;key=" + jasondata.key";
  $.ajax({
          type: "GET",
          url: encodeURI(uri),
          success: function(msg) {
              jasondata = eval('(' + msg + ')');
              var subjectline = jasondata.subjectline;
              alert(subjectline);
              }
      });
  </code></pre>
  
  <p>any help ...!!</p>