There are three ways of going about this.
The first two are the most common, the third is more complex but also more flexible.
1. Redirect to a URL (HTTP GET) and pass the variable in the URL's query string.
e.g.
function myFunction(){
....var myVar = "test";
....var sURL = "process.asp?var=" + myVar;
....window.location.href = sURL;
}
In your process.asp, you can read Request.QueryString(var) to retrieve the value.
2. Post the value in a form (HTTP POST)
e.g.
function myFunction(){
....var myVar = "test";
....document.myForm.var.value = myVar;
....document.myForm.action.value = "process.asp";
....document.myForm.submit();
}
In process.asp, you can read Request.Form(var) to retrieve the value.
3. You can use AJAX to submit the value in an asynchronous HTTP call to process.asp. Process.asp can return some value that you can process within JavaScript. This is a bit more complicated, but obviously more flexible (the user is not redirected away from the starting page). Google AJAX for more information.