title: How to call subroutine for pagination in ASP Classic
body: <p>I am trying to, upon clicking either Back or Next, increment or decrement a variable (tranquerypage), and then reload the current page with the variable's new value which can then be queried upon the loading of the page. However, I tried a few methods, and being new to ASP classic I had issues getting it to work properly. The vbscript methods have not been working. Here is what I have so far - </p>
  
  <pre><code>    &lt;%
  tranquerypage = session("tranquerypage")
  if session("tranquerypage") = "" then 
  session("tranquerypage") = 1 
  end if
  %&gt;
  
  &lt;INPUT TYPE=button Name=temp Value="Back" target="_self" onClick="&lt;%call back(tranquerypage)%&gt;"&gt;&amp;nbsp;&amp;nbsp;&lt;INPUT TYPE=button Name=temp Value="Next" target="_self" onClick="&lt;%call nextpage(tranquerypage)%&gt;"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  
      &lt;%
  sub back(tranquerypage)
  tranquerypage = tranquerypage - 1 
  end sub
  
  sub nextpage(tranquerypage)
  tranquerypage = tranquerypage + 1
  end sub
  %&gt;
  </code></pre>