Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NETC#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 - 17:30
Edited 9 Nov '12 - 23:21
Nelek26.3K

Comments
Soumen_Banerjee - 10 Nov '12 - 0:19
in conditional statement assignment part must be in left hand side part so you have to write like this radYes.Checked =.....

1 solution

(Convert.ToBoolean(objUserMgmtData.ActiveYN)?radYes.Checked : radNo.Checked);
 
try to do this
  Permalink  
Comments
aspnet_regiis -i - 10 Nov '12 - 4:47
correct +5
Dain Ucak - 10 Nov '12 - 4:49
thank you
shabari7 - 11 Nov '12 - 23:01
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 564
1 Maciej Los 255
2 CPallini 245
3 Aarti Meswania 173
4 Mahesh Bailwal 171
0 Sergey Alexandrovich Kryukov 9,162
1 OriginalGriff 7,179
2 CPallini 3,913
3 Rohan Leuva 3,176
4 Maciej Los 2,588


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 10 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid