Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am using this code

code:
SQL
if (datetimepicke.ValueChanged==true)

Error:

can only appear on the left hand side of += or -=


getting this error
Posted
Updated 14-May-13 1:49am
v2
Comments
Orcun Iyigun 14-May-13 7:53am    
The error states nothing to do with your if statement! Post your code properly! Are you using delegates or something like that?
Balu Balaji 14-May-13 8:13am    
this is my code there is two events one is ValueChanged and another one is TextChanged

if value is changed then i can do something that is my need actually

but following two conditions getting same error

how to know the value is changed or not

Collapse | Copy Code
if (raddtpJan.ValueChanged==true)
{
strMonthCode = "JAN";

icnt += 1;
}
else if (raddtpFeb.TextChanged == true)
{
strMonthCode = "FEB";

}

you cannot do a logical comparison on an event.

ValueChanged is an event on the control not a property.

Hence your error.
 
Share this answer
 
Don't post the same question more than once. I have already answered it here:

How to find out if datetime picker value is changed or not?[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900