I have some checkbox on page,like checkhold,
i get some rows from database ,which have control name,i want to use that sql data and using that set the control visibility false .
i m stuck in that ,cant find the solution.
string checkhold=dt.rows[0]["checkhold"].tostring();
HtmlGenericControl chkforward = (HtmlGenericControl)obj.Form.Page.FindControl(checkhold);
chkforward .Visible = false;
chkforward .Visible = false;
where i am wrong?


Manas MohapatraRank #182 · 13.2K reputationPosted Aug 14, 2015, 2:47 AM EDT
samba sivaRank #2,919 · 493 reputationPosted Aug 14, 2015, 2:48 AM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 14, 2015, 2:52 AM EDT
dt.rows[0]["checkhold"].tostring().Style.Add("display", "none");