System.Web.UI.BaseTemplateParser.GetUserControlType C# (CSharp) Method

GetUserControlType() private method

private GetUserControlType ( string virtualPath ) : Type
virtualPath string
return System.Type
		protected internal Type GetUserControlType (string virtualPath)
		{
			// Documented as a wrapper for the call below, but what does it do?
			return GetReferencedType (virtualPath);
		}
	}

Usage Example

Example #1
0
        internal void ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry)
        {
            Type type = null;

            if (_parser.FInDesigner)
            {
                // Get the designer to load the appropriate type
                type = _parser.GetDesignTimeUserControlType(ucRegisterEntry.TagPrefix,
                                                            ucRegisterEntry.TagName);
            }
            else
            {
                // Compile it into a Type
                type = _parser.GetUserControlType(ucRegisterEntry.UserControlSource.VirtualPathString);
            }

            if (type == null)
            {
                return;
            }

            if (_userControlRegisterEntries == null)
            {
                _userControlRegisterEntries = new Hashtable();
            }
            _userControlRegisterEntries[ucRegisterEntry.TagPrefix + ":" + ucRegisterEntry.TagName] = ucRegisterEntry;

            // Register the new tag, including its prefix
            RegisterTag(ucRegisterEntry.TagPrefix + ":" + ucRegisterEntry.TagName, type);
        }