asp.net.ph

ControlCollection.Remove Method

System.Web.UI Namespace   ControlCollection Class


Removes the specified control from a ControlCollection.

[ VB ]
Public Sub Remove ( _
   ByVal child As Control _
) 

[ C# ]
public void Remove (
   Control child
);

[ C++ ]
public: void Remove (
   Control* child
);

[ JScript ]
public function Remove (
   child : Control
);

Parameters

child
The Control to remove from the collection.

Remarks

Use this method to remove the specified Control from the parent server control's ControlCollection object.

To remove a Control at a specific location in the collection, use the RemoveAt method.

Example

The following example demonstrates how to use the Remove method to programmatically remove a control from a ControlCollection.

// locate the control to remove
Control control = myControl.Controls [ 0 ];
// remove the control from the Controls collection
myControl.Controls.Remove ( control );
  C# VB

See Also

ControlCollection Members   Controls.RemoveAt   Controls.Clear   Controls.Add   Controls.AddAt Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph