title: ASP.NET WebMethod Trims Leading 0 From String Parameter
body: <p>I have a WebMethod as follows:</p>
  
  <pre><code>[WebMethod]
  [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true)]
  public string CityState(string zip)
  {
      if (zip.Length &lt; 5) return string.Empty;
      //truncated for readability
  
       var data = "Foo";
       return data;
  }
  </code></pre>
  
  <p>In an ascx control I have the following:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          var data = { Zip: "09003"  };
          $.ajax({
              type: "GET",
              url: "/postalcodevalidator.asmx/CityState",
              data: data,
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (result) {
                  console.log("Woohoo");
              },
              error: function () {
                  console.log("Boohoo.")
              }
          });
  &lt;/script&gt;
  </code></pre>
  
  <p>During the request the leading 0 gets trimmed from the string.  How can I prevent that? </p>