How do I set findcontrol("cbfield") to TRUE
I just need to see the syntax for the server side page on how you set a findcontrol("checkbox field") Checked property to true! HELP...
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Sep 30, 2013, 12:46 PM EDT
((CheckBox)FindControl("cbfield")).Checked = true;
or, if you're not sure whether the control exists on the page:
Control ctrl = FindControl("cbfield");
if(ctrl != null) ((CheckBox)ctrl).Checked = true;
Shawn Austin7 reputationPosted Sep 30, 2013, 1:26 PM EDT
The only property that will come up that I can make work is .Visible. There has to be an answer to this problem. Thanks anyway.