當前位置: 首頁>>代碼示例>>C#>>正文


C# Control.UnloadRecursive方法代碼示例

本文整理匯總了C#中System.Web.UI.Control.UnloadRecursive方法的典型用法代碼示例。如果您正苦於以下問題:C# Control.UnloadRecursive方法的具體用法?C# Control.UnloadRecursive怎麽用?C# Control.UnloadRecursive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Web.UI.Control的用法示例。


在下文中一共展示了Control.UnloadRecursive方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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();
        }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:34,代碼來源:Control.cs

示例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();
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:25,代碼來源:Control.cs

示例3: RemovedControl

		protected internal virtual void RemovedControl (Control control)
		{
			control.UnloadRecursive (false);
			control._parent = null;
			control._page = null;
			control._namingContainer = null;
			if ((control.stateMask & AUTOID_SET) != 0) {
				control._userId = null;
				control.SetMask (ID_SET, false);
			}
			control.NullifyUniqueID ();
			control.SetMask (REMOVED, true);
			ResetControlsCache ();
		}
開發者ID:stabbylambda,項目名稱:mono,代碼行數:14,代碼來源:Control.cs

示例4: RemovedControl

		protected internal virtual void RemovedControl (Control control)
		{
			control.UnloadRecursive (false);
			control._parent = null;
			control._page = null;
			control._namingContainer = null;
		}
開發者ID:jjenki11,項目名稱:blaze-chem-rendering,代碼行數:7,代碼來源:Control.cs


注:本文中的System.Web.UI.Control.UnloadRecursive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。