本文整理汇总了C#中System.Web.UI.TemplateParser.LoadType方法的典型用法代码示例。如果您正苦于以下问题:C# TemplateParser.LoadType方法的具体用法?C# TemplateParser.LoadType怎么用?C# TemplateParser.LoadType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.TemplateParser
的用法示例。
在下文中一共展示了TemplateParser.LoadType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public override void Init (TemplateParser parser,
ControlBuilder parentBuilder,
Type type,
string tagName,
string id,
IDictionary attribs)
{
if (attribs == null)
throw new ParseException (parser.Location, "Error in ObjectTag.");
attribs.Remove ("runat");
this.id = attribs ["id"] as string;
attribs.Remove ("id");
if (this.id == null || this.id.Trim () == "")
throw new ParseException (parser.Location, "Object tag must have a valid ID.");
scope = attribs ["scope"] as string;
string className = attribs ["class"] as string;
attribs.Remove ("scope");
attribs.Remove ("class");
if (className == null || className.Trim () == "")
throw new ParseException (parser.Location, "Object tag must have 'class' attribute.");
this.type = parser.LoadType (className);
if (this.type == null)
throw new ParseException (parser.Location, "Type " + className + " not found.");
if (attribs ["progid"] != null || attribs ["classid"] != null)
throw new ParseException (parser.Location, "ClassID and ProgID are not supported.");
if (attribs.Count > 0)
throw new ParseException (parser.Location, "Unknown attribute");
}