to get list of controls from content place holder
-
:)i need to retrieve all the controls placed in the content place holder in content page ,so that i can get all the textboxes from them to clear their text when i click reset button Suni
-
:)i need to retrieve all the controls placed in the content place holder in content page ,so that i can get all the textboxes from them to clear their text when i click reset button Suni
You can Navigate through the ContentPlaceHolder Control's and Check the control is of Type TextBox. You can write something like this...
For Each child As Control In c.Controls If TypeOf child Is TextBox Then CType(child , TextBox).Text = "" End If Next
Regards
- J O H N -
-
You can Navigate through the ContentPlaceHolder Control's and Check the control is of Type TextBox. You can write something like this...
For Each child As Control In c.Controls If TypeOf child Is TextBox Then CType(child , TextBox).Text = "" End If Next
Regards
- J O H N -
:)JohnPrabhu ji! i have tried your code but it's not working. i got it solved this way.. .i put an empty panel .using findcontrol()collected each wanted control and performed desired task on that control. thank you for helping me. Best Wishes. SunithaNallana
-
:)JohnPrabhu ji! i have tried your code but it's not working. i got it solved this way.. .i put an empty panel .using findcontrol()collected each wanted control and performed desired task on that control. thank you for helping me. Best Wishes. SunithaNallana