From 7e860908cdbdd35a944f55c67d344575e37147e2 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 10 Feb 2020 15:25:25 -0800 Subject: [PATCH 1/5] add missing sample --- xml/System.Web.UI/ClientIDMode.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xml/System.Web.UI/ClientIDMode.xml b/xml/System.Web.UI/ClientIDMode.xml index c67a0318fc1..219826fbba1 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[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]> From 967c4731ba589c614d9c8545f198c3e7e8ec3445 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 10 Feb 2020 15:28:39 -0800 Subject: [PATCH 2/5] add missing sample --- xml/System.Web.UI/Control.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xml/System.Web.UI/Control.xml b/xml/System.Web.UI/Control.xml index e50620b2aa1..5e9fd7de9a0 100644 --- a/xml/System.Web.UI/Control.xml +++ b/xml/System.Web.UI/Control.xml @@ -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[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]> From 0de1271decd5839fed7f046539a96ce6493fd780 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 10 Feb 2020 15:37:58 -0800 Subject: [PATCH 3/5] more sample fixes --- xml/System.Web.UI/Control.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xml/System.Web.UI/Control.xml b/xml/System.Web.UI/Control.xml index 5e9fd7de9a0..a16b8ccf3ec 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[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[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[System.Web.UI.ClientIDMode#3](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.master)] ]]> @@ -1668,7 +1668,8 @@ The following example shows controls that ## 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)] From 656a5175152bca3486c3e7451fa88455c503e7cf Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 10 Feb 2020 17:03:34 -0800 Subject: [PATCH 4/5] try a different language id --- xml/System.Web.UI/ClientIDMode.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Web.UI/ClientIDMode.xml b/xml/System.Web.UI/ClientIDMode.xml index 219826fbba1..9f1755385e9 100644 --- a/xml/System.Web.UI/ClientIDMode.xml +++ b/xml/System.Web.UI/ClientIDMode.xml @@ -39,7 +39,7 @@ - `ListView1_ProductIDLabel_34` - `ListView1_ProductIDLabel_43` -[!code-aspx[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] +[!code-aspx-csharp[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]> From ed377258bea4dbe5b041be50da48e54ccf570281 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 10 Feb 2020 17:05:04 -0800 Subject: [PATCH 5/5] try different lang id --- xml/System.Web.UI/Control.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Web.UI/Control.xml b/xml/System.Web.UI/Control.xml index a16b8ccf3ec..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[System.Web.UI.ClientIDMode#1](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.ascx)] + [!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[System.Web.UI.ClientIDMode#2](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.aspx)] + [!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[System.Web.UI.ClientIDMode#3](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.master)] + [!code-aspx-csharp[System.Web.UI.ClientIDMode#3](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/seasons.master)] ]]> @@ -796,7 +796,7 @@ The following example shows controls that - `ListView1_ProductIDLabel_34` - `ListView1_ProductIDLabel_43` -[!code-aspx[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] +[!code-aspx-csharp[System.Web.UI.ClientIDMode#11](~/samples/snippets/common/VS_Snippets_WebNet/system.web.ui.clientidmode/common/predictable.aspx#11)] ]]>