title: How to pass parameters to web service via URL
body: <p>I have  web service that I can consume successfully, but I am sharing my webservice with someone else who wants to input the parameters via the URL eg:  //localhost:12345/Lead.asmx?op=SendFiles&amp;Id=1234678&amp;Name=Joe&amp;Surname=Kevin</p>
  
  <p>I added : </p>
  
  <pre><code>&lt;webServices&gt;
        &lt;protocols&gt;
          &lt;add name="HttpGet"/&gt;
        &lt;/protocols&gt;
      &lt;/webServices&gt;
  </code></pre>
  
  <p>to my Web.Config file and my SendFile.asmx.cs code looks like this:</p>
  
  <pre><code>    namespace SendFiles
     {
         /// &lt;summary&gt;
         /// Summary description for Service1
         /// &lt;/summary&gt;
      [WebService(Namespace = "http://testco.co.za/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [System.ComponentModel.ToolboxItem(false)]
      // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
      // [System.Web.Script.Services.ScriptService]
      public class SendFile : System.Web.Services.WebService
      {
  
          [WebMethod]
          public bool PostToDB(LoadEntity _lead)
          {
  
              ConnectToSQLDB(ConfigurationManager.AppSettings["Server"],   ConfigurationManager.AppSettings["DB"],
                                  ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], ref connectionRef);
  
              if (LI.ImportFiles(_lead, ref (error)) == true)
              {
                  return true;
              }
              else
                  return false;
          }
  </code></pre>
  
  <p>I tried adding :</p>
  
  <pre><code> [OperationContract]
      [WebGet]
      bool PostToDB(string IDNo, string FName, string SName);
  </code></pre>
  
  <p>But I get an error that I must declare a body because it is not marked abstract, extern or partial.  Can anyone help?</p>