Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
(Convert.ToBoolean(objUserMgmtData.ActiveYN))?radYes.Checked = true : radNo.Checked = true;
 
or
 
(Convert.ToBoolean(objUserMgmtData.ActiveYN))?radYes.Checked : radNo.Checked;
 
message:Only assignment, call, increment, decrement and new object expressions can be used as a statement.
 
objUserMgmtData.ActiveYN is bool type
Posted 9-Nov-12 18:30pm
PBGuy1.8K
Edited 10-Nov-12 0:21am
Nelek66.7K
v2
Comments
Soumen_Banerjee at 10-Nov-12 0:19am
   
in conditional statement assignment part must be in left hand side part
so you have to write like this
radYes.Checked =.....

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

(Convert.ToBoolean(objUserMgmtData.ActiveYN)?radYes.Checked : radNo.Checked);
 
try to do this
  Permalink  
Comments
aspnet_regiis -i at 10-Nov-12 4:47am
   
correct +5
Dain Ucak at 10-Nov-12 4:49am
   
thank you
shabari7 at 11-Nov-12 23:01pm
   
NO use... Still the same message... oops

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

  Print Answers RSS
0 CHill60 205
1 Sergey Alexandrovich Kryukov 175
2 Zoltán Zörgő 175
3 Richard MacCutchan 175
4 Richard Deeming 170
0 Sergey Alexandrovich Kryukov 9,328
1 OriginalGriff 6,806
2 Peter Leow 4,442
3 Zoltán Zörgő 3,984
4 Richard MacCutchan 2,807


Advertise | Privacy | Mobile
Web01 | 2.8.150129.1 | Last Updated 10 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100