title: Call code behind method from Jquery
body: <p>I have this question:</p>
  
  <p>How could I call a codebehind method from jquery? I have a web page: (ForgetPass.aspx) with its respective codebehind (ForgetPass.aspx.cs). On the codebehind I have a public method:</p>
  
  <pre><code>public void ChangeSession(string strChangeSession)
      { some stuff... }
  </code></pre>
  
  <p>When I was working on MVC, calling that method was as simple as:</p>
  
  <pre><code>$.post("MyPageController/ChangeSession", { strChangeSession: 'yes' });
  </code></pre>
  
  <p>But now that I'm on aspx/C# I don't know how to call that method from jquery (or maybe I need to use <code>[WebMethod]</code> clause on the codebehind ??)</p>
  
  <p>Thanks in advance. </p>