-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ListControlDataBindingHandler.xml
143 lines (124 loc) · 11.1 KB
/
ListControlDataBindingHandler.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<Type Name="ListControlDataBindingHandler" FullName="System.Web.UI.Design.WebControls.ListControlDataBindingHandler">
<TypeSignature Language="C#" Value="public class ListControlDataBindingHandler : System.Web.UI.Design.DataBindingHandler" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ListControlDataBindingHandler extends System.Web.UI.Design.DataBindingHandler" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.Design.WebControls.ListControlDataBindingHandler" />
<TypeSignature Language="VB.NET" Value="Public Class ListControlDataBindingHandler
Inherits DataBindingHandler" />
<TypeSignature Language="F#" Value="type ListControlDataBindingHandler = class
 inherit DataBindingHandler" />
<TypeSignature Language="C++ CLI" Value="public ref class ListControlDataBindingHandler : System::Web::UI::Design::DataBindingHandler" />
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.Design.DataBindingHandler</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Performs data binding of a <see cref="T:System.Web.UI.WebControls.ListControl" /> Web server control within a visual designer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class performs design-time data binding of a <xref:System.Web.UI.WebControls.ListControl> control. The <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class is referenced by the <xref:System.Web.UI.WebControls.ListControl> using the <xref:System.Web.UI.DataBindingHandlerAttribute> class.
The <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.DataBindControl%2A> method performs the design-time data binding.
## Examples
This section contains two code examples. The first one demonstrates how to derive a control from the <xref:System.Web.UI.WebControls.RadioButtonList> control and associate it with its data binding handler. The second one demonstrates how to the derive a class from the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class.
The following code example shows how to derive the `SimpleRadioButtonList` control from the <xref:System.Web.UI.WebControls.RadioButtonList> control, and then apply the <xref:System.Web.UI.DataBindingHandlerAttribute> attribute to associate the `SimpleRadioButtonList` control with its data binding handler, the `SimpleRadioButtonListDataBindingHandler` class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListControlDesigner_Samples/CS/SimpleRadioButtonList.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListControlDesigner_Samples/VB/simpleradiobuttonlist.vb" id="Snippet5":::
The following code example shows how to derive the `SimpleRadioButtonListDataBindingHandler` class from the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class. It overrides the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.DataBindControl%2A> method to add a message to the associated `SimpleRadioButtonList` control when that control is data bound.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListControlDesigner_Samples/CS/SimpleRadioButtonListDataBindingHandler.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListControlDesigner_Samples/VB/simpleradiobuttonlistdatabindinghandler.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ListControl" />
<altmember cref="T:System.Web.UI.Design.WebControls.ListControlDesigner" />
<altmember cref="T:System.Web.UI.Design.DataBindingHandler" />
<altmember cref="T:System.Web.UI.DataBindingHandlerAttribute" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/wxh45wzs(v=vs.100)">ASP.NET Control Designers Overview</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/12yydcke(v=vs.100)">Walkthrough: Creating a Basic Control Designer for a Web Server Control</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)">Extending Design-Time Support</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ms171820(v=vs.120)">How to: Extend the Appearance and Behavior of Controls in Design Mode</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ListControlDataBindingHandler ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 ListControlDataBindingHandler();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.Design.WebControls.ListControlDataBindingHandler" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The .NET Framework internally constructs a new instance of the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class when the class is referenced by a <xref:System.Web.UI.DataBindingHandlerAttribute> attribute.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ListControl" />
<altmember cref="T:System.Web.UI.Design.WebControls.ListControlDesigner" />
<altmember cref="T:System.Web.UI.Design.DataBindingHandler" />
<altmember cref="T:System.Web.UI.DataBindingHandlerAttribute" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/wxh45wzs(v=vs.100)">ASP.NET Control Designers Overview</related>
</Docs>
</Member>
<Member MemberName="DataBindControl">
<MemberSignature Language="C#" Value="public override void DataBindControl (System.ComponentModel.Design.IDesignerHost designerHost, System.Web.UI.Control control);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void DataBindControl(class System.ComponentModel.Design.IDesignerHost designerHost, class System.Web.UI.Control control) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.DataBindControl(System.ComponentModel.Design.IDesignerHost,System.Web.UI.Control)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub DataBindControl (designerHost As IDesignerHost, control As Control)" />
<MemberSignature Language="F#" Value="override this.DataBindControl : System.ComponentModel.Design.IDesignerHost * System.Web.UI.Control -> unit" Usage="listControlDataBindingHandler.DataBindControl (designerHost, control)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void DataBindControl(System::ComponentModel::Design::IDesignerHost ^ designerHost, System::Web::UI::Control ^ control);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="designerHost" Type="System.ComponentModel.Design.IDesignerHost" />
<Parameter Name="control" Type="System.Web.UI.Control" />
</Parameters>
<Docs>
<param name="designerHost">The <see cref="T:System.ComponentModel.Design.IDesignerHost" /> for the document that contains the control.</param>
<param name="control">The <see cref="T:System.Web.UI.Control" /> to bind.</param>
<summary>Performs data binding on the specified control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.WebControls.ListControl> control that is specified by `control` has a data source specified within its <xref:System.Web.UI.IDataBindingsAccessor.DataBindings%2A> property, the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.DataBindControl%2A> method clears the <xref:System.Web.UI.WebControls.ListControl.Items%2A> collection of the <xref:System.Web.UI.WebControls.ListControl>, and then adds a string message indicating that the <xref:System.Web.UI.WebControls.ListControl> is data bound to the <xref:System.Web.UI.WebControls.ListControl.Items%2A> collection.
## Examples
The following code example shows how to override the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler.DataBindControl%2A> method to add a string message to the associated `SimpleRadioButtonList` control when that control is data bound.
This code example is part of a larger example provided for the <xref:System.Web.UI.Design.WebControls.ListControlDataBindingHandler> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListControlDesigner_Samples/CS/SimpleRadioButtonListDataBindingHandler.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListControlDesigner_Samples/VB/simpleradiobuttonlistdatabindinghandler.vb" id="Snippet7":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ListControl" />
<altmember cref="P:System.Web.UI.WebControls.ListControl.Items" />
<altmember cref="P:System.Web.UI.IDataBindingsAccessor.DataBindings" />
<altmember cref="M:System.Web.UI.Design.DataBindingHandler.DataBindControl(System.ComponentModel.Design.IDesignerHost,System.Web.UI.Control)" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/wxh45wzs(v=vs.100)">ASP.NET Control Designers Overview</related>
</Docs>
</Member>
</Members>
</Type>