Problem with two images!
-
I have two Images that are in Itemtemplate one is sad.gif then the other is laughing.gif. then in EditItemTemplate is a RadioButtonList with two RadioButtons Good Mood and Bad Mood. all are in the same column. This is how it is supposed to work when Good Mood is selected, and insert button is pressed, the image laughing.gif is to be chosen. This code was supposed to work but I don't understand why it's not working: But whether I select Good Mood or Bad Mood only the image laughing.gif is selected. Where could I be going wrong? Thanks
-
I have two Images that are in Itemtemplate one is sad.gif then the other is laughing.gif. then in EditItemTemplate is a RadioButtonList with two RadioButtons Good Mood and Bad Mood. all are in the same column. This is how it is supposed to work when Good Mood is selected, and insert button is pressed, the image laughing.gif is to be chosen. This code was supposed to work but I don't understand why it's not working: But whether I select Good Mood or Bad Mood only the image laughing.gif is selected. Where could I be going wrong? Thanks
I think that the problem is that the
Eval
method returns a value of typeObject
, and when you compare that to a string, it will compare them as objects, not as strings. Even if they have the same value, they are not the same object, so the comparison always fails. Try casting the value fromEval
intoString
.--- single minded; short sighted; long gone;
-
I think that the problem is that the
Eval
method returns a value of typeObject
, and when you compare that to a string, it will compare them as objects, not as strings. Even if they have the same value, they are not the same object, so the comparison always fails. Try casting the value fromEval
intoString
.--- single minded; short sighted; long gone;
-
I think that the problem is that the
Eval
method returns a value of typeObject
, and when you compare that to a string, it will compare them as objects, not as strings. Even if they have the same value, they are not the same object, so the comparison always fails. Try casting the value fromEval
intoString
.--- single minded; short sighted; long gone;
Why is it that when I insert data I fast get an error : Specified cast is not valid. But When I run it the second time I find the data was saved the right image was selected! Actually I can say every thing works well apart that when I atempt to insert data this error appears: Specified cast is not valid. on line: . Thanks