Form Controls
-
Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please
-
Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please
There is a Controls collection that you can iterate through. As it does not have a find method, I doubt there's another class offering this facility, but you can iterate through and search yourself. Christian Graus - Microsoft MVP - C++
-
Which class does the FindControl method belong to. I need to be able to return which controls lie on a form. E.g. if there is a textbox on the form i should be able to return a messagebox which says that the textbox(textbox_name) exists on the form. Any suggestions please
There is a
FindControl
method referred to by you in theSystem.Web.UI.Control
class. However, apparently there is no such method in theSystem.Windows.Forms.Control
class from which theForm
class is derived. But, as suggested by Christian Grauss, you can use theControls
property of theForm
class alongwith theControlCollection
class member methods to iterate through the controls on a form. Regards, Ashok Dhamija _____________________________ Padam Technologies