help for enabled property
-
There are some set of server controls its property enabled= may be true or false,now in code behind how to find its current state and i am getting the controls id during runtime like this foreach(Control c in form1.Controls) { ............ }
Thanks In Advance
-
There are some set of server controls its property enabled= may be true or false,now in code behind how to find its current state and i am getting the controls id during runtime like this foreach(Control c in form1.Controls) { ............ }
Thanks In Advance
Hi, You have to cast the control first like foreach (Control c in form1.Controls) { if (c.ID == lnkLink) //where lnkLink is the ID of the control { LinkButton link = (LinkButton)c; //cast control object to whatever control it should be (ie. LinkButton, TextBox, etc.) bool status = c.Enabled; ... } }