title: Pass Query string to WebMethod in Javascript
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/901115/get-query-string-values-in-javascript">Get query string values in JavaScript</a>  </p>
  </blockquote>
  
  
  
  <p>What is the best way to get "test1" from </p>
  
  <blockquote>
    <p><a href="http://localhost:3311/blabl/allprofiles.aspx?username=test1" rel="nofollow noreferrer">http://localhost:3311/blabl/allprofiles.aspx?username=test1</a></p>
  </blockquote>
  
  <p>, and through PageMethod pass it to webmethod. I think one way is to take from window.location.pathname, cut the string and pass it like a parameter. </p>