public string GetTagPrefix(Type objectType)
{
if (objectType.Namespace.StartsWith ("System.Web.UI"))
return "asp";
DocumentDirective[] directives = host.RootDocument.GetDirectives ("Reference");
foreach (DocumentDirective dd in directives)
if (0 == string.Compare (dd["Namespace"], objectType.Namespace, true, CultureInfo.InvariantCulture))
return dd["Tagprefix"];
throw new Exception ("A tag prefix has not been registered for " + objectType.ToString ());
}