title: Regarding Web Services C# ho to pass argument from input
body: <p>I want to figure out how can I pass value from input to web services using c#? I have code:</p>
  
  <p><strong>Animal.aspx:</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;
              &lt;asp:Label ID="LabelForType" runat="server" Text="Animal Type"&gt;&lt;/asp:Label&gt;
              &lt;asp:TextBox ID="AnimalType" runat="server" CssClass="form-control" Text="Animal Type"&gt;&lt;/asp:TextBox&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Animal.aspx.cs:</strong></p>
  
  <pre><code>protected void AddAnimal_Click(object sender, EventArgs e)
          {
              ClientService service = new ClientService();
  
              service.getAnimalType();
  
  
          }
  
          public String getAnimalType()
          {
              return AnimalType.Text.ToString();
          }
  </code></pre>
  
  <p><strong>Web services. ClientService.asmx.cs</strong></p>
  
  <pre><code>[WebMethod]
          public String getAnimalType()
          {
  
              return animal.getAnimalType(); 
  
          }
  </code></pre>
  
  <p>Unfortunately it does not work. If I send my input value as a parameter to a web service. I can type whatever in soap window but it will not return the value which I typed in input. Any ideas? Or maybe there is a tutorial? Thank you.</p>
  
  <p><strong>I am looking how to pass the value from textbox ID="AnimalType" to WebServices. If type Chicken it should pass chicken to web services.</strong></p>
  
  <p><em>Basically. Create value - > Send it from C# as a parameter to Web Services - > Took that value in Java by calling to Web Services.</em></p>
  
  <p>I made like.</p>
  
  <pre><code>private String type;
  
          public void setAnimalType(String typee)
          {
              type = typee;  
          }
  
          [WebMethod]
          public String getAnimalType()
          {
              return type;
          }
  </code></pre>
  
  <p>But it returns null.</p>