本文整理匯總了C#中System.Web.UI.Control.ClearCachedUniqueIDRecursive方法的典型用法代碼示例。如果您正苦於以下問題:C# Control.ClearCachedUniqueIDRecursive方法的具體用法?C# Control.ClearCachedUniqueIDRecursive怎麽用?C# Control.ClearCachedUniqueIDRecursive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.UI.Control
的用法示例。
在下文中一共展示了Control.ClearCachedUniqueIDRecursive方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RemovedControl
/// <devdoc>
/// </devdoc>
protected internal virtual void RemovedControl(Control control) {
if (control.OwnerControl != null) {
throw new InvalidOperationException(SR.GetString(SR.Substitution_NotAllowed));
}
if ((_namingContainer != null) && (control._id != null)) {
_namingContainer.DirtyNameTable();
}
// Controls may need to do their own cleanup.
control.UnloadRecursive(false);
control._parent = null;
control._page = null;
control._namingContainer = null;
// Don't reset template source virtual directory on TemplateControl's, because
// the path is their own, not their parent. i.e. it doesn't change no matter
// where in the tree they end up.
if (!(control is TemplateControl)) {
if (control._occasionalFields != null) {
control._occasionalFields.TemplateSourceVirtualDirectory = null;
}
}
if (control._occasionalFields != null ) {
control._occasionalFields.TemplateControl = null;
}
control.flags.Clear(mustRenderID);
control.ClearCachedUniqueIDRecursive();
}
示例2: RemovedControl
protected internal virtual void RemovedControl(Control control)
{
if (control.OwnerControl != null)
{
throw new InvalidOperationException(System.Web.SR.GetString("Substitution_NotAllowed"));
}
if ((this._namingContainer != null) && (control._id != null))
{
this._namingContainer.DirtyNameTable();
}
control.UnloadRecursive(false);
control._parent = null;
control._page = null;
control._namingContainer = null;
if (!(control is System.Web.UI.TemplateControl) && (control._occasionalFields != null))
{
control._occasionalFields.TemplateSourceVirtualDirectory = null;
}
if (control._occasionalFields != null)
{
control._occasionalFields.TemplateControl = null;
}
control.flags.Clear(0x800);
control.ClearCachedUniqueIDRecursive();
}