asp.net.ph

ControlCollection.RemoveAt Method

System.Web.UI Namespace   ControlCollection Class


Removes a control at the specified index in a ControlCollection.

[ VB ]
Public Sub RemoveAt ( _
   ByVal index As Integer
) 

[ C# ]
public void RemoveAt (
   int index
);

[ C++ ]
public: void RemoveAt (
   int index
);

[ JScript ]
public function RemoveAt (
   index : int
);

Parameters

index
The index number of the Control to remove.

Remarks

Use this method to remove a Control object at the specified index location in the parent server control's ControlCollection object.

To remove a Control based on reference, use the Remove method.

Example

The following example demonstrates how to use the RemoveAt method to programmatically remove a Control at the specified index location in a ControlCollection.

// get the controls collection
ControlCollection myControls = myControl.Controls;
// remove the control at the given index
myControls.RemoveAt ( 0 );
  C# VB

See Also

ControlCollection Members   Controls.Remove   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