title: How to extract jquery.ajax serialize form parameters in asp.net
body: <p>I want to extract form parameters, just like in java <code>request.getParameter("blah")</code></p>
  
  <p>How to do it in C#, presently I serialized my form with jQuery and sending to web method, there I want to extract it</p>
  
  <p>ajax</p>
  
  <pre><code>$("#btn").click(function () {
              alert($('#login').serialize());
              $.ajax({
                  type: "POST",
                  url: "Default.aspx/Login",
                  data: "{'vals': '" + $('#login').serialize() + "'}",
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (msg) {
                      TINY.box.show({ html: msg.d, animate: false, close: false, mask: true, boxid: 'success', autohide: 3, top: 200, left: 500 });
                  }
              });
          });
      });
  </code></pre>
  
  <p>code-behind</p>
  
  <pre><code>[WebMethod]
          public static string Login(String vals)
          {
             //WHAT TO DO HERE SO THAT I CAN EXTRACT FROM THAT STRING
            return vals;
          }
  </code></pre>
  
  <p>I can see the data resurned by msg.d at the client, but thats something like this "uname=1&amp;pwd=2". How to extract it?? please some one help me out. Also is there any way to access the webmethod without making it static?</p>