you can use Session
for Example
in code behind
Session["username"] = this.txtUserName.Text
Session["password"] = this.txtPassword.Text
then if you want to retrieve to other page
for example
you want to pass the value to string x,y and make some condition
string x = Session["username"].ToString().Trim();
string y = Session["password"].ToString().Trim();
if ( x != string.Empty && y != string.Empty )
{
}