HierarchyInfo.OnRenaming(HierarchyRenameEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the Rename command is called from the user interface (UI) or programmatically.
protected public:
virtual void OnRenaming(Microsoft::Web::Management::Client::HierarchyRenameEventArgs ^ e);
protected internal virtual void OnRenaming (Microsoft.Web.Management.Client.HierarchyRenameEventArgs e);
abstract member OnRenaming : Microsoft.Web.Management.Client.HierarchyRenameEventArgs -> unit
override this.OnRenaming : Microsoft.Web.Management.Client.HierarchyRenameEventArgs -> unit
Protected Friend Overridable Sub OnRenaming (e As HierarchyRenameEventArgs)
Parameters
A HierarchyRenameEventArgs that contains the event data
Examples
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;
}
Remarks
Application developers can set the Microsoft.Web.Management.Client.HierarchyRenameEventArgs.Cancel property to false
to prevent the node name from changing.