How can I combine two conditions with AND to get this...
here is the code.
{
if (user.Text = "moe" & pass.Text = "2123812812")
Response.Redirect("Default2.aspx?user=" + user.Text);
else
Response.Redirect("default3.aspx");
}
It generates an error with & operand... whats right to code?
2006-10-18
14:54:58
·
2 answers
·
asked by
Doublethink..!!
1
in
Computers & Internet
➔ Programming & Design
Ok I tried with &&....
the same error generated... which is
"Operator '&&' cannot be applied to operands of type 'String' and 'String'."
Any idea?
2006-10-18
14:59:16 ·
update #1
thanks anyways guys... the problem was i used the assignment operator "=".. i should have used "==". it worked now.
2006-10-18
15:18:09 ·
update #2