When passing variables from one asp page to another, your options are to store the variable:
1. as a session variable
ex:
session("mailval") = 1
'this assigns the value
thisPassedVal =session("mailval")
'this is how you retrieve the session variable
'if you have a server farm, co-located servers, clusters, etc., stay away from session variables
2. as a form variable
mailval = request.form("mailval")
3. in your querystring as you have displayed
someasppage.asp?mailval=1
mailval = request.querystring("mailval")
4. store in a database, and retrieve it from any page
this doesn't seem like a viable option for this type of variable use, however.
Good luck.