You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example shows <xref:System.Web.UI.WebControls.Label> controls that are contained in a <xref:System.Web.UI.WebControls.ListView> control. On the <xref:System.Web.UI.WebControls.ListView> control, the <xref:System.Web.UI.Control.ClientIDMode%2A> property is set to <xref:System.Web.UI.ClientIDMode.Predictable> and the <xref:System.Web.UI.WebControls.ListView.ClientIDRowSuffix%2A> property is set to `ProductID`. In the rendered HTML, this creates three `span` elements that correspond to three `ProductIDLabel` controls. When the page runs, the `id` attributes for the `span` elements are set to the following values:
793
-
794
-
- `ListView1_ProductIDLabel_1`
795
-
796
-
- `ListView1_ProductIDLabel_34`
797
792
798
-
- `ListView1_ProductIDLabel_43`
793
+
The following example shows <xref:System.Web.UI.WebControls.Label> controls that are contained in a <xref:System.Web.UI.WebControls.ListView> control. On the <xref:System.Web.UI.WebControls.ListView> control, the <xref:System.Web.UI.Control.ClientIDMode%2A> property is set to <xref:System.Web.UI.ClientIDMode.Predictable> and the <xref:System.Web.UI.WebControls.ListView.ClientIDRowSuffix%2A> property is set to `ProductID`. In the rendered HTML, this creates three `span` elements that correspond to three `ProductIDLabel` controls. When the page runs, the `id` attributes for the `span` elements are set to the following values:
The following example creates an event, named `Click`, that adds and removes handlers from the control's <xref:System.ComponentModel.EventHandlerList> collection when the event is called from a page.
1671
1670
1672
-
**Note** This example optimizes how a control adds and removes events from the list of them that the control maintains. If you create custom control and want to define an event, use code similar to this. This technique can be used in C#, but not in Visual Basic.
1671
+
> [!NOTE]
1672
+
> This example optimizes how a control adds and removes events from the list of them that the control maintains. If you create custom control and want to define an event, use code similar to this. This technique can be used in C#, but not in Visual Basic.
0 commit comments