データ連結ハンドラの型名を取得します。型名が null 参照 (Visual Basic では Nothing) の場合、このプロパティは空の文字列を返します。
Public ReadOnly Property HandlerTypeName As String
[C#]
public string HandlerTypeName {get;}
[C++]
public: __property String* get_HandlerTypeName();
[JScript]
public function get HandlerTypeName() : String;
プロパティ値
ハンドラの型名。
使用例
<DataBindingHandlerAttribute(GetType(System.Web.UI.Design.TextDataBindingHandler))> _
Public Class SimpleWebControl
Inherits WebControl
' Insert code for class members here
End Class 'SimpleWebControl
Class TestAttributes
Public Shared Sub Main()
Dim myAttributes As System.ComponentModel.AttributeCollection = _
TypeDescriptor.GetAttributes(GetType(SimpleWebControl))
Dim myDataBindingHandlerAttribute As DataBindingHandlerAttribute = _
myAttributes(GetType(DataBindingHandlerAttribute))
If Not (myDataBindingHandlerAttribute Is Nothing) Then
Console.Write(("DataBindingHandlerAttribute's HandlerTypeName is : " + _
myDataBindingHandlerAttribute.HandlerTypeName))
End If
End Sub 'Main
End Class 'TestAttributes
[C#]
[
DataBindingHandlerAttribute(typeof(System.Web.UI.Design.TextDataBindingHandler))
]
public class SimpleWebControl:WebControl
{
// Insert code for class members here
}
class TestAttributes
{
public static void Main()
{
System.ComponentModel.AttributeCollection myAttributes =
TypeDescriptor.GetAttributes(typeof(SimpleWebControl));
DataBindingHandlerAttribute myDataBindingHandlerAttribute =
myAttributes[typeof(DataBindingHandlerAttribute)] as DataBindingHandlerAttribute;
if(myDataBindingHandlerAttribute != null)
{
Console.Write("DataBindingHandlerAttribute's HandlerTypeName is : " +
myDataBindingHandlerAttribute.HandlerTypeName);
}
}
}
[C++]
[
DataBindingHandlerAttribute(__typeof(System::Web::UI::Design::TextDataBindingHandler))
]
public __gc class SimpleWebControl : public WebControl {
// Insert code for class members here
};
int main() {
System::ComponentModel::AttributeCollection* myAttributes =
TypeDescriptor::GetAttributes(__typeof(SimpleWebControl));
DataBindingHandlerAttribute * myDataBindingHandlerAttribute =
dynamic_cast<DataBindingHandlerAttribute*>
(myAttributes->Item[__typeof(DataBindingHandlerAttribute)]);
if (myDataBindingHandlerAttribute != 0) {
Console::Write(S"DataBindingHandlerAttribute's HandlerTypeName is : {0}",
myDataBindingHandlerAttribute->HandlerTypeName);
}
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
参照
DataBindingHandlerAttribute クラス | DataBindingHandlerAttribute メンバ | System.Web.UI 名前空間