HtmlSelectBuilder.GetChildControlType メソッド
アセンブリ: System.Web (system.web.dll 内)

Public Overrides Function GetChildControlType ( _ tagName As String, _ attribs As IDictionary _ ) As Type
Dim instance As HtmlSelectBuilder Dim tagName As String Dim attribs As IDictionary Dim returnValue As Type returnValue = instance.GetChildControlType(tagName, attribs)
戻り値
HtmlSelect コントロールの指定した子コントロールの Type。


GetChildControlType メソッドをオーバーライドして、カスタムの子コントロールの型を確認する方法を次のコード例に示します。作業用の完全なコード例については、HtmlSelectBuilder クラスの概要トピックを参照してください。
<AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)> _ Public Overrides Function GetChildControlType(ByVal tagName As String, ByVal attribs As IDictionary) As Type ' Distinguish between two possible types of child controls. If tagName.ToLower().EndsWith("myoption1") Then Return GetType(MyOption1) ElseIf tagName.ToLower().EndsWith("myoption2") Then Return GetType(MyOption2) End If Return Nothing End Function
[AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)] public override Type GetChildControlType(string tagName, IDictionary attribs) { // Distinguish between two possible types of child controls. if (tagName.ToLower().EndsWith("myoption1")) { return typeof(MyOption1); } else if (tagName.ToLower().EndsWith("myoption2")) { return typeof(MyOption2); } return null; }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HtmlSelectBuilder.GetChildControlType メソッドのページへのリンク