casstd
asked on
C# string and bool value check in single line having problem.
Hi,
I am working in C#, ASP.NET2.0. When the user login I have to check the two values one is bool and another is String.
if (IsChangePwd=true && Session["CompanyType"] = "0001")
// I get error in this line Operator && can be used for object bool and object string type.
Could anyone help me how to fix this.
Thank you.
I am working in C#, ASP.NET2.0. When the user login I have to check the two values one is bool and another is String.
if (IsChangePwd=true && Session["CompanyType"] = "0001")
// I get error in this line Operator && can be used for object bool and object string type.
Could anyone help me how to fix this.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in C# comaparison Operator is == not =