Amitesh Verma

Amitesh Verma

  • NA
  • 746
  • 84.4k

Dynamic Button Visibility

Aug 14 2015 6:01 AM
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; 
 
 
where i am wrong?

Answers (3)