Actually what do you mean by hide? if you use query string to pass information your variables will be always visible. but you can encrypt the variable names also to make them not understandable. so your data will be safe. this is what you can do at most.
you can do something like this -
string[] variableNames = {"var1", "var2", "var3" };
string[] variableValues = { "val1", "val2", "val3" };
// Creating the query string to pass
string encryptedData = encryptMyData(variableNames, variableValues);
Response.Redirect(www.gotothispage.aspx? + encryptedData);
// Method to create the query string
public string encryptMyData(string[] variableNames, string[] variableValues)
{
string encryptedUrl = String.Empty;
for(int i=0;i< variableNames.Count; i++)
{
if(i==0)
encryptedUrl += "?";
else
encryptedUrl += "&";
// using desired encryption algorith to encrypt both variable name and value
encryptedUrl += myEncryptionAlgo(variableNames[i]) + "=" + myEncryptionAlgo(variableValues[i]);
}
// encoding the encrypted url to make sure it is http compatible
return HttpUtility.UrlEncode(encryptedUrl);
}
now read the values on other page like -
// using the same encryption algorithm to again encrypt the variable name
// as we have to use it to capture the valuel from query string
string encryptedVarName1 = myEncryptionAlgo("var1");
string myVal1 = Request.QueryString[encryptedVarName1].ToString();
//decrypting the data for that variable
myVal1 = myDecryptionAlgo(myVal1);
....
....
....
....
// this way reading all the data
string encryptedVarName3 = myEncryptionAlgo("var3");
string myVal3 = Request.QueryString[encryptedVarName3].ToString();
myVal3 = myDecryptionAlgo(myVal3);