Export (0) Print
Expand All

OnRenaming Method

Occurs when the Rename command is called from the user interface (UI) or programmatically.

Namespace:  Microsoft.Web.Management.Client
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

protected internal virtual void OnRenaming(
	HierarchyRenameEventArgs e

Application developers can set the Cancel property to false to prevent the node name from changing.

The following example implements the OnRenaming method and writes the new name to the trace listener.

protected override void OnRenaming(HierarchyRenameEventArgs e)
    Trace.WriteLine("OnRenaming called with e.Label = \"" + e.Label + "\"");
    e.Cancel = false;

Community Additions

© 2014 Microsoft