title: How to call an ASP.Net Web Service in javascript
body: <p>As the title states, I'm trying to call a web service written in ASP.Net (Same solution, but different project in visual studio) from javascript. Since I added the web reference for the service prior to this for calling it in VB.Net, I tried to use this reference by directly calling it.</p>
  
  <p>In the body of the Default.aspx page, I have this code:</p>
  
  <pre><code>&lt;asp:ScriptManager id="ScriptManager1" runat="server"&gt;
  &lt;Services&gt;
  &lt;asp:ServiceReference Path="~/App_WebReferences/localhost/ServiceName.discomap" InlineScript="true" /&gt;
  &lt;/Services&gt;
  &lt;/asp:ScriptManager&gt;
  </code></pre>
  
  <p>but in javascript, I can't call my service at all. Could anyone explain me how? I'd want to do something like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   alert(ServiceName.HelloWorld())
  &lt;/script&gt;
  </code></pre>