There are only two ways to pass data to *ANY* server side application: Via a query string or via POST data. And in both cases, you must do so by "hitting" a URL on the server.
In general, with ASP.NET, you would use POST data. And that means you must send the data by submitting a <FORM>.
So the first answer is simple: Use a form field (i.e., <INPUT NAME=whatever>).
variable(s) into the form field value(s).
I assume this is related to your question about panning an image, so you could just do:
document.forms.panX.value = panX;
document.forms.panY.value = panY;
Now when the user submits the <FORM> (presumably, by clicking on your ZOOM button), those values will be available to your C# code via simply