diff --git a/xml/System.Web.UI/ClientIDMode.xml b/xml/System.Web.UI/ClientIDMode.xml index c67a0318fc1..9f1755385e9 100644 --- a/xml/System.Web.UI/ClientIDMode.xml +++ b/xml/System.Web.UI/ClientIDMode.xml @@ -35,11 +35,11 @@ This example creates HTML with three `ProductIDLabel` controls. When the page runs, the IDs for the controls will be the following: -- `ListView1_ProductIDLabel_1` - -- `ListView1_ProductIDLabel_34` - -- `ListView1_ProductIDLabel_43` +- `ListView1_ProductIDLabel_1` +- `ListView1_ProductIDLabel_34` +- `ListView1_ProductIDLabel_43` + +[!code-aspx-csharp[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]> diff --git a/xml/System.Web.UI/Control.xml b/xml/System.Web.UI/Control.xml index e50620b2aa1..6a2da85d618 100644 --- a/xml/System.Web.UI/Control.xml +++ b/xml/System.Web.UI/Control.xml @@ -718,15 +718,15 @@ span#ProductIDLabel { background-color: white; } The following example shows the user control. - + [!code-aspx-csharp[System.Web.UI.ClientIDMode#1](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.ascx)] The following example shows the content page that contains the user control. - + [!code-aspx-csharp[System.Web.UI.ClientIDMode#2](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.aspx)] The following example shows the master page that contains the content page. - + [!code-aspx-csharp[System.Web.UI.ClientIDMode#3](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.master)] ]]> @@ -789,15 +789,14 @@ span#ProductIDLabel { background-color: white; } ## Examples - The following example shows controls that are contained in a control. On the control, the property is set to and the 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: - -- `ListView1_ProductIDLabel_1` - -- `ListView1_ProductIDLabel_34` -- `ListView1_ProductIDLabel_43` +The following example shows controls that are contained in a control. On the control, the property is set to and the 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: +- `ListView1_ProductIDLabel_1` +- `ListView1_ProductIDLabel_34` +- `ListView1_ProductIDLabel_43` +[!code-aspx-csharp[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]> @@ -1669,7 +1668,8 @@ span#ProductIDLabel { background-color: white; } ## Examples The following example creates an event, named `Click`, that adds and removes handlers from the control's collection when the event is called from a page. - **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. + > [!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. [!code-csharp[System.Web.UI.Page_VerifyRenderingInServerForm#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs#1)]