diff --git a/xml/System.Net.Security/NegotiateStream.xml b/xml/System.Net.Security/NegotiateStream.xml index b3490bd0bae..24032368106 100644 --- a/xml/System.Net.Security/NegotiateStream.xml +++ b/xml/System.Net.Security/NegotiateStream.xml @@ -77,12 +77,12 @@ The following example demonstrates the client side of a client-server connection that uses the . The client authenticates and sends a message to the server asynchronously. -[!code-csharp[NclNegoAsyncClient#0](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#0)] -[!code-vb[NclNegoAsyncClient#0](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#0)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet0"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet0"::: The following code example demonstrates the server side of a client-server connection that uses the to authenticate the client and read a message sent by the client. -[!code-csharp[NclNegoAsyncServer#0](~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs#0)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs" id="Snippet0"::: ]]> @@ -157,7 +157,7 @@ The following code example demonstrates the server side of a client-server conne The following code example demonstrates calling this constructor. - [!code-csharp[NclNegoSyncClient#3](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#3)] + :::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet3"::: ]]> @@ -214,8 +214,8 @@ The following code example demonstrates the server side of a client-server conne The following example demonstrates calling this constructor. This code example is part of a larger example provided for the class. -[!code-csharp[NclNegoAsyncClient#1](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#1)] -[!code-vb[NclNegoAsyncClient#1](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet1"::: ]]> @@ -1699,8 +1699,8 @@ The following example demonstrates calling this constructor. This code example i The following example demonstrates calling this method to begin an asynchronous authentication for the client. -[!code-csharp[NclNegoAsyncClient#2](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#2)] -[!code-vb[NclNegoAsyncClient#2](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet2"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet2"::: ]]> @@ -2573,7 +2573,7 @@ The following example demonstrates calling this method to begin an asynchronous The following code example demonstrates starting an asynchronous read operation. This code example is part of a larger example provided for the class. - [!code-csharp[NclNegoAsyncServer#1](~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs#1)] + :::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs" id="Snippet1"::: ]]> @@ -2681,13 +2681,13 @@ The following example demonstrates calling this method to begin an asynchronous The following example demonstrates beginning an asynchronous write operation. -[!code-csharp[NclNegoAsyncClient#3](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#3)] -[!code-vb[NclNegoAsyncClient#3](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#3)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet3"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet3"::: The following method is called when the operation completes. -[!code-csharp[NclNegoAsyncClient#4](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#4)] -[!code-vb[NclNegoAsyncClient#4](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#4)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet4"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet4"::: ]]> @@ -2762,7 +2762,7 @@ The following method is called when the operation completes. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -2816,7 +2816,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -2874,7 +2874,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -2931,7 +2931,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -3219,7 +3219,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates ending an asynchronous read operation. For an example that demonstrates starting the operation, see . -[!code-csharp[NclNegoAsyncServer#3](~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs#3)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs" id="Snippet3"::: ]]> @@ -3288,8 +3288,8 @@ Authentication has not occurred. The following example demonstrates a method that is called to complete the asynchronous write operation. For an example that demonstrates starting the operation, see . -[!code-csharp[NclNegoAsyncClient#4](~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs#4)] -[!code-vb[NclNegoAsyncClient#4](~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb#4)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/AuthenticatedStream/Overview/client.cs" id="Snippet4"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net.Security/AuthenticatedStream/Overview/client.vb" id="Snippet4"::: ]]> @@ -3352,7 +3352,7 @@ Authentication has not occurred. The following code example demonstrates flushing the stream. -[!code-csharp[NclNegoSyncClient#4](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#4)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet4"::: ]]> @@ -3453,7 +3453,7 @@ The following code example demonstrates flushing the stream. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3509,7 +3509,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3564,7 +3564,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3622,7 +3622,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3679,7 +3679,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3734,7 +3734,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#1](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet1"::: ]]> @@ -3790,7 +3790,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -3910,7 +3910,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates reading from a . -[!code-csharp[NclNegoSyncServer#1](~/snippets/csharp/System.Net.Security/NegotiateStream/Read/server.cs#1)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/Read/server.cs" id="Snippet1"::: ]]> @@ -4071,7 +4071,7 @@ This method reads asynchronously as much data as is available into `buffer` and The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoSyncClient#2](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet2"::: ]]> @@ -4125,7 +4125,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates displaying the value of this property. -[!code-csharp[NclNegoAsyncServer#2](~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs#2)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/Overview/server.cs" id="Snippet2"::: ]]> @@ -4292,7 +4292,7 @@ The following code example demonstrates displaying the value of this property. The following code example demonstrates writing to a . -[!code-csharp[NclNegoSyncClient#4](~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs#4)] +:::code language="csharp" source="~/snippets/csharp/System.Net.Security/NegotiateStream/.ctor/client.cs" id="Snippet4"::: ]]> @@ -4484,7 +4484,7 @@ The following code example demonstrates writing to a diff --git a/xml/System.Net/WebClient.xml b/xml/System.Net/WebClient.xml index 86f22d5d713..ccf06457038 100644 --- a/xml/System.Net/WebClient.xml +++ b/xml/System.Net/WebClient.xml @@ -112,9 +112,9 @@ ## Examples The following code example takes the URI of a resource, retrieves it, and displays the response. - [!code-cpp[NCLWebClientUserAgent#1](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientUserAgent/CPP/useragent.cpp#1)] - [!code-csharp[NCLWebClientUserAgent#1](~/snippets/csharp/System.Net/WebClient/Overview/useragent.cs#1)] - [!code-vb[NCLWebClientUserAgent#1](~/snippets/visualbasic/System.Net/WebClient/Overview/useragent.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientUserAgent/CPP/useragent.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/Overview/useragent.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/Overview/useragent.vb" id="Snippet1"::: ]]> @@ -180,9 +180,9 @@ ## Examples The following code example creates a instance and then uses it to download data from a server and display it on the system console, to download data from a server and write it to a file, and to upload form values to a server and receive the response. - [!code-cpp[WebClient#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient/CPP/webclient.cpp#1)] - [!code-csharp[WebClient#1](~/snippets/csharp/System.Net/WebClient/.ctor/webclient.cs#1)] - [!code-vb[WebClient#1](~/snippets/visualbasic/System.Net/WebClient/.ctor/webclient.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient/CPP/webclient.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/.ctor/webclient.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/.ctor/webclient.vb" id="Snippet1"::: ]]> @@ -365,9 +365,9 @@ ## Examples The following code example downloads data from an Internet server and displays it on the console. It assumes that the server's address (such as http://www.contoso.com) is in `hostUri` and that the path to the resource (such as /default.htm) is in `uriSuffix`. - [!code-cpp[WebClient_BaseAddress_ResponseHeaders#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_BaseAddress_ResponseHeaders/CPP/webclient_baseaddress_responseheaders.cpp#1)] - [!code-csharp[WebClient_BaseAddress_ResponseHeaders#1](~/snippets/csharp/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.cs#1)] - [!code-vb[WebClient_BaseAddress_ResponseHeaders#1](~/snippets/visualbasic/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_BaseAddress_ResponseHeaders/CPP/webclient_baseaddress_responseheaders.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.vb" id="Snippet1"::: ]]> @@ -565,9 +565,9 @@ ## Examples The following code example uses the user's system credentials to authenticate a request. - [!code-cpp[WebClientAuthentication#1](~/snippets/cpp/VS_Snippets_Remoting/WebClientAuthentication/CPP/webclientauth.cpp#1)] - [!code-csharp[WebClientAuthentication#1](~/snippets/csharp/System.Net/WebClient/Credentials/webclientauth.cs#1)] - [!code-vb[WebClientAuthentication#1](~/snippets/visualbasic/System.Net/WebClient/Credentials/webclientauth.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClientAuthentication/CPP/webclientauth.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/Credentials/webclientauth.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/Credentials/webclientauth.vb" id="Snippet1"::: ]]> @@ -650,9 +650,9 @@ ## Examples The following code example requests data from a server and displays the data returned. It assumes that `remoteUri` contains a valid URI for the requested data. - [!code-cpp[WebClient_DownloadData#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_DownloadData/CPP/webclient_downloaddata.cpp#1)] - [!code-csharp[WebClient_DownloadData#1](~/snippets/csharp/System.Net/WebClient/DownloadData/webclient_downloaddata.cs#1)] - [!code-vb[WebClient_DownloadData#1](~/snippets/visualbasic/System.Net/WebClient/DownloadData/webclient_downloaddata.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_DownloadData/CPP/webclient_downloaddata.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/DownloadData/webclient_downloaddata.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/DownloadData/webclient_downloaddata.vb" id="Snippet1"::: ]]> @@ -969,15 +969,15 @@ ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#21](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#21)] - [!code-csharp[NCLWebClientAsync#21](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#21)] - [!code-vb[NCLWebClientAsync#21](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#21)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet21"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet21"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet21"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#22](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#22)] - [!code-csharp[NCLWebClientAsync#22](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#22)] - [!code-vb[NCLWebClientAsync#22](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#22)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet22"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet22"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet22"::: ]]> @@ -1226,9 +1226,9 @@ ## Examples The following code example downloads a file from http://www.contoso.com to the local hard drive. - [!code-cpp[WebClient_DownloadFile#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_DownloadFile/CPP/webclient_downloadfile.cpp#1)] - [!code-csharp[WebClient_DownloadFile#1](~/snippets/csharp/System.Net/WebClient/DownloadFile/webclient_downloadfile.cs#1)] - [!code-vb[WebClient_DownloadFile#1](~/snippets/visualbasic/System.Net/WebClient/DownloadFile/webclient_downloadfile.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_DownloadFile/CPP/webclient_downloadfile.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/DownloadFile/webclient_downloadfile.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/DownloadFile/webclient_downloadfile.vb" id="Snippet1"::: ]]> @@ -1588,9 +1588,9 @@ ## Examples The following code example demonstrates setting an event handler for the `DownloadFileCompleted` event. - [!code-cpp[NCLWebClientAsync#19](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#19)] - [!code-csharp[NCLWebClientAsync#19](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#19)] - [!code-vb[NCLWebClientAsync#19](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#19)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet19"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet19"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet19"::: ]]> @@ -1866,9 +1866,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for the `DownloadProgressChanged` event. -[!code-cpp[DownloadProgressChanged](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#SnippetDownloadProgressChanged)] -[!code-csharp[DownloadProgressChanged](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#SnippetDownloadProgressChanged)] -[!code-vb[DownloadProgressChanged](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#SnippetDownloadProgressChanged)] +:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="SnippetDownloadProgressChanged"::: +:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="SnippetDownloadProgressChanged"::: +:::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="SnippetDownloadProgressChanged"::: ]]> @@ -1947,9 +1947,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates calling this method. - [!code-cpp[NCLWebClientAsync#25](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#25)] - [!code-csharp[NCLWebClientAsync#25](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#25)] - [!code-vb[NCLWebClientAsync#25](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#25)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet25"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet25"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet25"::: ]]> @@ -2272,15 +2272,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#28](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#28)] - [!code-csharp[NCLWebClientAsync#28](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#28)] - [!code-vb[NCLWebClientAsync#28](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#28)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet28"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet28"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet28"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#29](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#29)] - [!code-csharp[NCLWebClientAsync#29](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#29)] - [!code-vb[NCLWebClientAsync#29](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#29)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet29"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet29"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet29"::: ]]> @@ -2514,9 +2514,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting the value of this property. - [!code-cpp[NCLWebClientAsync#1](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#1)] - [!code-csharp[NCLWebClientAsync#1](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#1)] - [!code-vb[NCLWebClientAsync#1](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet1"::: ]]> @@ -2582,8 +2582,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#1](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#1)] - [!code-csharp[NCLCustomWebClient#1](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet1"::: ]]> @@ -2659,8 +2659,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#2](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#2)] - [!code-csharp[NCLCustomWebClient#2](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet2"::: ]]> @@ -2728,8 +2728,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#3](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#3)] - [!code-csharp[NCLCustomWebClient#3](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#3)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet3"::: ]]> @@ -2824,9 +2824,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example uses the collection to set the HTTP `Content-Type` header to `application/x-www-form-urlencoded,` to notify the server that form data is attached to the post. - [!code-cpp[WebClient_UpLoadData_Headers#2](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData_Headers/CPP/webclient_uploaddata_headers.cpp#2)] - [!code-csharp[WebClient_UpLoadData_Headers#2](~/snippets/csharp/System.Net/WebClient/Headers/webclient_uploaddata_headers.cs#2)] - [!code-vb[WebClient_UpLoadData_Headers#2](~/snippets/visualbasic/System.Net/WebClient/Headers/webclient_uploaddata_headers.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData_Headers/CPP/webclient_uploaddata_headers.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/Headers/webclient_uploaddata_headers.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/Headers/webclient_uploaddata_headers.vb" id="Snippet2"::: ]]> @@ -2939,8 +2939,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#4](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#4)] - [!code-csharp[NCLCustomWebClient#4](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#4)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet4"::: ]]> @@ -3010,8 +3010,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#5](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#5)] - [!code-csharp[NCLCustomWebClient#5](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#5)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet5"::: ]]> @@ -3081,8 +3081,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#12](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#12)] - [!code-csharp[NCLCustomWebClient#12](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#12)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet12"::: ]]> @@ -3152,8 +3152,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#6](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#6)] - [!code-csharp[NCLCustomWebClient#6](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#6)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet6"::: ]]> @@ -3223,8 +3223,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#7](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#7)] - [!code-csharp[NCLCustomWebClient#7](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#7)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet7"::: ]]> @@ -3294,8 +3294,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#8](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#8)] - [!code-csharp[NCLCustomWebClient#8](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#8)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet8"::: ]]> @@ -3365,8 +3365,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#9](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#9)] - [!code-csharp[NCLCustomWebClient#9](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#9)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet9"::: ]]> @@ -3436,8 +3436,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#10](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#10)] - [!code-csharp[NCLCustomWebClient#10](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#10)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet10"::: ]]> @@ -3507,8 +3507,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#13](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#13)] - [!code-csharp[NCLCustomWebClient#13](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#13)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet13"::: ]]> @@ -3575,8 +3575,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#11](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#11)] - [!code-csharp[NCLCustomWebClient#11](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#11)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet11"::: ]]> @@ -3646,8 +3646,8 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example shows an implementation of this method that can be customized by a class derived from . - [!code-cpp[NCLCustomWebClient#14](~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp#14)] - [!code-csharp[NCLCustomWebClient#14](~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs#14)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCustomWebClient/CPP/mywebclient.cpp" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/GetWebRequest/mywebclient.cs" id="Snippet14"::: ]]> @@ -3786,9 +3786,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example opens the resource identified by `uriString` and displays the results on the system console. The returned by is closed when the data has been read. - [!code-cpp[WebClient_OpenRead#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenRead/CPP/webclient_openread.cpp#1)] - [!code-csharp[WebClient_OpenRead#1](~/snippets/csharp/System.Net/WebClient/OpenRead/webclient_openread.cs#1)] - [!code-vb[WebClient_OpenRead#1](~/snippets/visualbasic/System.Net/WebClient/OpenRead/webclient_openread.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenRead/CPP/webclient_openread.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/OpenRead/webclient_openread.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/OpenRead/webclient_openread.vb" id="Snippet1"::: ]]> @@ -4126,15 +4126,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#30](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#30)] - [!code-csharp[NCLWebClientAsync#30](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#30)] - [!code-vb[NCLWebClientAsync#30](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#30)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet30"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet30"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet30"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#31](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#31)] - [!code-csharp[NCLWebClientAsync#31](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#31)] - [!code-vb[NCLWebClientAsync#31](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#31)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet31"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet31"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet31"::: ]]> @@ -4398,9 +4398,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example reads data from the command line and uses to obtain a stream for writing the data. The returned by is closed after the data is sent. - [!code-cpp[WebClient_OpenWrite2#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenWrite2/CPP/webclient_openwrite2.cpp#1)] - [!code-csharp[WebClient_OpenWrite2#1](~/snippets/csharp/System.Net/WebClient/OpenWrite/webclient_openwrite2.cs#1)] - [!code-vb[WebClient_OpenWrite2#1](~/snippets/visualbasic/System.Net/WebClient/OpenWrite/webclient_openwrite2.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenWrite2/CPP/webclient_openwrite2.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/OpenWrite/webclient_openwrite2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/OpenWrite/webclient_openwrite2.vb" id="Snippet1"::: ]]> @@ -4562,9 +4562,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example reads data from the command line and uses to obtain a stream used to write the data. The returned by must be closed to send the data. - [!code-cpp[WebClient_OpenWrite#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenWrite/CPP/webclient_openwrite.cpp#1)] - [!code-csharp[WebClient_OpenWrite#1](~/snippets/csharp/System.Net/WebClient/OpenWrite/webclient_openwrite.cs#1)] - [!code-vb[WebClient_OpenWrite#1](~/snippets/visualbasic/System.Net/WebClient/OpenWrite/webclient_openwrite.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_OpenWrite/CPP/webclient_openwrite.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/OpenWrite/webclient_openwrite.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/OpenWrite/webclient_openwrite.vb" id="Snippet1"::: ]]> @@ -4970,15 +4970,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#14](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#14)] - [!code-csharp[NCLWebClientAsync#14](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#14)] - [!code-vb[NCLWebClientAsync#14](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#14)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet14"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet14"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#15](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#15)] - [!code-csharp[NCLWebClientAsync#15](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#15)] - [!code-vb[NCLWebClientAsync#15](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#15)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet15"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet15"::: ]]> @@ -5476,9 +5476,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example takes user input from the command line and builds a that is assigned to the property. It then downloads the response from the server to a local file. - [!code-cpp[WebClient_QueryString#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_QueryString/CPP/webclient_querystring.cpp#1)] - [!code-csharp[WebClient_QueryString#1](~/snippets/csharp/System.Net/WebClient/QueryString/webclient_querystring.cs#1)] - [!code-vb[WebClient_QueryString#1](~/snippets/visualbasic/System.Net/WebClient/QueryString/webclient_querystring.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_QueryString/CPP/webclient_querystring.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/QueryString/webclient_querystring.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/QueryString/webclient_querystring.vb" id="Snippet1"::: ]]> @@ -5546,9 +5546,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example downloads and displays the returned by a server. - [!code-cpp[WebClient_BaseAddress_ResponseHeaders#2](~/snippets/cpp/VS_Snippets_Remoting/WebClient_BaseAddress_ResponseHeaders/CPP/webclient_baseaddress_responseheaders.cpp#2)] - [!code-csharp[WebClient_BaseAddress_ResponseHeaders#2](~/snippets/csharp/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.cs#2)] - [!code-vb[WebClient_BaseAddress_ResponseHeaders#2](~/snippets/visualbasic/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_BaseAddress_ResponseHeaders/CPP/webclient_baseaddress_responseheaders.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/BaseAddress/webclient_baseaddress_responseheaders.vb" id="Snippet2"::: ]]> @@ -5632,9 +5632,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example converts a string entered from the console to a array and posts the array to the specified server using . Any response from the server is displayed to the console. - [!code-cpp[WebClient_UpLoadData2#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData2/CPP/webclient_uploaddata2.cpp#1)] - [!code-csharp[WebClient_UpLoadData2#1](~/snippets/csharp/System.Net/WebClient/UploadData/webclient_uploaddata2.cs#1)] - [!code-vb[WebClient_UpLoadData2#1](~/snippets/visualbasic/System.Net/WebClient/UploadData/webclient_uploaddata2.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData2/CPP/webclient_uploaddata2.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/UploadData/webclient_uploaddata2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/UploadData/webclient_uploaddata2.vb" id="Snippet1"::: ]]> @@ -5820,9 +5820,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example converts a string entered from the console into a byte array and posts the array to the specified server using . Any response from the server is displayed to the console. - [!code-cpp[WebClient_UpLoadData_Headers#2](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData_Headers/CPP/webclient_uploaddata_headers.cpp#2)] - [!code-csharp[WebClient_UpLoadData_Headers#2](~/snippets/csharp/System.Net/WebClient/Headers/webclient_uploaddata_headers.cs#2)] - [!code-vb[WebClient_UpLoadData_Headers#2](~/snippets/visualbasic/System.Net/WebClient/Headers/webclient_uploaddata_headers.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadData_Headers/CPP/webclient_uploaddata_headers.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/Headers/webclient_uploaddata_headers.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/Headers/webclient_uploaddata_headers.vb" id="Snippet2"::: ]]> @@ -6287,15 +6287,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#36](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#36)] - [!code-csharp[NCLWebClientAsync#36](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#36)] - [!code-vb[NCLWebClientAsync#36](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#36)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet36"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet36"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet36"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#37](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#37)] - [!code-csharp[NCLWebClientAsync#37](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#37)] - [!code-vb[NCLWebClientAsync#37](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#37)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet37"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet37"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet37"::: ]]> @@ -6745,9 +6745,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example uploads the specified file to the specified URI using . Any response returned by the server is displayed on the console. - [!code-cpp[WebClient_UpLoadFile#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadFile/CPP/webclient_uploadfile.cpp#1)] - [!code-csharp[WebClient_UpLoadFile#1](~/snippets/csharp/System.Net/WebClient/UploadFile/webclient_uploadfile.cs#1)] - [!code-vb[WebClient_UpLoadFile#1](~/snippets/visualbasic/System.Net/WebClient/UploadFile/webclient_uploadfile.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadFile/CPP/webclient_uploadfile.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/UploadFile/webclient_uploadfile.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/UploadFile/webclient_uploadfile.vb" id="Snippet1"::: The following code example shows an ASP.NET page that can accept posted files and is suitable for use with the method. The page must reside on a Web server. Its address provides the value for the `address` parameter of the method. @@ -6952,9 +6952,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example uploads the specified file to the specified URI using . Any response returned by the server is displayed on the console. - [!code-cpp[WebClient_UpLoadFile2#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadFile2/CPP/webclient_uploadfile2.cpp#1)] - [!code-csharp[WebClient_UpLoadFile2#1](~/snippets/csharp/System.Net/WebClient/UploadFile/webclient_uploadfile2.cs#1)] - [!code-vb[WebClient_UpLoadFile2#1](~/snippets/visualbasic/System.Net/WebClient/UploadFile/webclient_uploadfile2.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UpLoadFile2/CPP/webclient_uploadfile2.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/UploadFile/webclient_uploadfile2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/UploadFile/webclient_uploadfile2.vb" id="Snippet1"::: The following code example shows an ASP.NET page that can accept posted files and is suitable for use with the method. The page must reside on a Web server. Its address provides the value for the `address` parameter of the method. @@ -7478,15 +7478,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#4](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#4)] - [!code-csharp[NCLWebClientAsync#4](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#4)] - [!code-vb[NCLWebClientAsync#4](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#4)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet4"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#5](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#5)] - [!code-csharp[NCLWebClientAsync#5](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#5)] - [!code-vb[NCLWebClientAsync#5](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#5)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet5"::: ]]> @@ -7973,15 +7973,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#4](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#4)] - [!code-csharp[NCLWebClientAsync#4](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#4)] - [!code-vb[NCLWebClientAsync#4](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#4)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet4"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#42](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#42)] - [!code-csharp[NCLWebClientAsync#42](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#42)] - [!code-vb[NCLWebClientAsync#42](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#42)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet42"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet42"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet42"::: ]]> @@ -8062,9 +8062,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates calling this method. - [!code-cpp[NCLWebClientAsync#1](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#1)] - [!code-csharp[NCLWebClientAsync#1](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#1)] - [!code-vb[NCLWebClientAsync#1](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet1"::: ]]> @@ -8235,9 +8235,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates calling this method. - [!code-cpp[NCLWebClientAsync#2](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#2)] - [!code-csharp[NCLWebClientAsync#2](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#2)] - [!code-vb[NCLWebClientAsync#2](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet2"::: ]]> @@ -8706,15 +8706,15 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting an event handler for this event. - [!code-cpp[NCLWebClientAsync#38](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#38)] - [!code-csharp[NCLWebClientAsync#38](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#38)] - [!code-vb[NCLWebClientAsync#38](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#38)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet38"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet38"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet38"::: The following code example shows an implementation of a handler for this event. - [!code-cpp[NCLWebClientAsync#39](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#39)] - [!code-csharp[NCLWebClientAsync#39](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#39)] - [!code-vb[NCLWebClientAsync#39](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#39)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet39"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet39"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet39"::: ]]> @@ -9170,9 +9170,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example gathers information from the user (name, age, and address) and posts the values to the server using . Any response from the server is displayed on the console. - [!code-cpp[WebClient_UploadValues#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UploadValues/CPP/webclient_uploadvalues.cpp#1)] - [!code-csharp[WebClient_UploadValues#1](~/snippets/csharp/System.Net/WebClient/UploadValues/webclient_uploadvalues.cs#1)] - [!code-vb[WebClient_UploadValues#1](~/snippets/visualbasic/System.Net/WebClient/UploadValues/webclient_uploadvalues.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UploadValues/CPP/webclient_uploadvalues.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/UploadValues/webclient_uploadvalues.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/UploadValues/webclient_uploadvalues.vb" id="Snippet1"::: ]]> @@ -9376,9 +9376,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example gathers information from the user (name, age, and address) and posts the values to the server using . Any response from the server is displayed on the console. - [!code-cpp[WebClient_UploadValues2#1](~/snippets/cpp/VS_Snippets_Remoting/WebClient_UploadValues2/CPP/webclient_uploadvalues2.cpp#1)] - [!code-csharp[WebClient_UploadValues2#1](~/snippets/csharp/System.Net/WebClient/UploadValues/webclient_uploadvalues2.cs#1)] - [!code-vb[WebClient_UploadValues2#1](~/snippets/visualbasic/System.Net/WebClient/UploadValues/webclient_uploadvalues2.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebClient_UploadValues2/CPP/webclient_uploadvalues2.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/WebClient/UploadValues/webclient_uploadvalues2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/WebClient/UploadValues/webclient_uploadvalues2.vb" id="Snippet1"::: ]]> @@ -10347,9 +10347,9 @@ internal class MyWebClient : WebClientProtocol ## Examples The following code example demonstrates setting this property. - [!code-cpp[NCLWebClientAsync#3](~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#3)] - [!code-csharp[NCLWebClientAsync#3](~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs#3)] - [!code-vb[NCLWebClientAsync#3](~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb#3)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.vb" id="Snippet3"::: ]]> diff --git a/xml/System.Reflection.Metadata/MethodBodyBlock.xml b/xml/System.Reflection.Metadata/MethodBodyBlock.xml index 1f3aa821f9e..97dee502373 100644 --- a/xml/System.Reflection.Metadata/MethodBodyBlock.xml +++ b/xml/System.Reflection.Metadata/MethodBodyBlock.xml @@ -37,7 +37,7 @@ The format of CIL instructions and metadata is defined by the ECMA-335 specifica ## Examples This example shows how to read method bodies for all methods in the specified type definition and display method body information: -[!code-csharp[](~/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.cs#PrintMethods)] +:::code language="csharp" source="~/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.cs" id="SnippetPrintMethods"::: ]]> diff --git a/xml/System.Reflection.Metadata/SequencePoint.xml b/xml/System.Reflection.Metadata/SequencePoint.xml index d5d008564e6..a40b6dacead 100644 --- a/xml/System.Reflection.Metadata/SequencePoint.xml +++ b/xml/System.Reflection.Metadata/SequencePoint.xml @@ -48,7 +48,7 @@ Sequence point is a structure that contains the mapping between IL offset and co ## Examples This example shows how to read sequence points of the method defined by the metadata token and display its source line mappings: -[!code-csharp[](~/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.cs#ReadSourceLineData)] +:::code language="csharp" source="~/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.cs" id="SnippetReadSourceLineData"::: ]]> diff --git a/xml/System.ServiceModel.Configuration/ComContractElement.xml b/xml/System.ServiceModel.Configuration/ComContractElement.xml index 29e0eb03d18..6abfe18b96c 100644 --- a/xml/System.ServiceModel.Configuration/ComContractElement.xml +++ b/xml/System.ServiceModel.Configuration/ComContractElement.xml @@ -27,7 +27,7 @@ ## Examples You can use the following configuration to specify the namespace, contract name, and user defined types to be included. You can also specify other settings for a service contract - [!code-xml[S_UEComContractElement#100](~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app.config#100)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app.config" id="Snippet100"::: When the service is initialized, the specified namespaces and contract names are applied to the generated service descriptions. @@ -162,7 +162,7 @@ ComSvcConfig.exe /i /application:OnlineStore /contract:ItemOrders.Financial,IFin When you run the ComSvcConfig.exe tool, it then generates the following service contract listing the previously mentioned methods as `exposedMethod` elements. - [!code-xml[S_UEComContractElement#101](~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app2.config#101)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app2.config" id="Snippet101"::: At service initialization time, the runtime attempts to generate a service contract by reflecting over and adding only the methods included in the list of `exposedMethod` elements. A trace is produced for every interface method that is not included on the service contract. @@ -358,7 +358,7 @@ ComSvcConfig.exe /i /application:OnlineStore /contract:ItemOrders.Financial,IFin ## Examples The following example demonstrates adding two specific UDTs to the `` section of the configuration file for this purpose. - [!code-xml[S_UEComContractElement#102](~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app3.config#102)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_uecomcontractelement/common/app3.config" id="Snippet102"::: The attributes of the `` element are defined as follows: diff --git a/xml/System.ServiceModel.Configuration/ServiceDebugElement.xml b/xml/System.ServiceModel.Configuration/ServiceDebugElement.xml index 22b51b3837b..d81820ed424 100644 --- a/xml/System.ServiceModel.Configuration/ServiceDebugElement.xml +++ b/xml/System.ServiceModel.Configuration/ServiceDebugElement.xml @@ -44,7 +44,7 @@ ## Examples The following code example shows how to use a configuration file to enable the HTML help page feature and return exception information inside a SOAP fault back to the client for debugging purposes (in addition to enabling metadata support). - [!code-xml[ServiceDebugBehaviorConfig#1](~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config" id="Snippet1"::: ]]> diff --git a/xml/System.ServiceModel.Description/CallbackDebugBehavior.xml b/xml/System.ServiceModel.Description/CallbackDebugBehavior.xml index 845494baafc..a7af7140cd6 100644 --- a/xml/System.ServiceModel.Description/CallbackDebugBehavior.xml +++ b/xml/System.ServiceModel.Description/CallbackDebugBehavior.xml @@ -56,7 +56,7 @@ ## Examples The following code example shows a client configuration file that instructs WCF to return managed exception information from a client callback object in SOAP messages. - [!code-xml[SCA.CallbackContract#4](~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.exe.config" id="Snippet4"::: ]]> @@ -167,7 +167,7 @@ ## Examples The following code example shows a client configuration file that instructs WCF to return managed exception information from a client callback object in SOAP messages. - [!code-xml[SCA.CallbackContract#4](~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.exe.config" id="Snippet4"::: ]]> diff --git a/xml/System.ServiceModel.Description/IEndpointBehavior.xml b/xml/System.ServiceModel.Description/IEndpointBehavior.xml index 798dee02b96..fa754fd2d49 100644 --- a/xml/System.ServiceModel.Description/IEndpointBehavior.xml +++ b/xml/System.ServiceModel.Description/IEndpointBehavior.xml @@ -82,19 +82,19 @@ The first step is to implement the message inspector. - [!code-csharp[IEndpointBehavior#2](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet2"::: The next code example shows the use of the method to add the message inspector to the property. - [!code-csharp[IEndpointBehavior#4](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet4"::: The following code example shows the implementation of in order to enable use of the message inspector behavior from a configuration file. - [!code-csharp[IEndpointBehavior#3](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet3"::: Finally, the following configuration file shows how the preceding example can be used from configuration. - [!code-xml[IEndpointBehavior#5](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/hostapplication.exe.config#5)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/hostapplication.exe.config" id="Snippet5"::: ]]> @@ -251,19 +251,19 @@ The first step is to implement the message inspector. - [!code-csharp[IEndpointBehavior#2](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet2"::: The next code example shows the use of the method to add the message inspector to the property. - [!code-csharp[IEndpointBehavior#4](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet4"::: The following code example shows the implementation of in order to enable use of the message inspector behavior from a configuration file. - [!code-csharp[IEndpointBehavior#3](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/iendpointbehaviormessageinspector.cs" id="Snippet3"::: Finally, the following configuration file shows how the preceding example can be used from configuration. - [!code-xml[IEndpointBehavior#5](~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/hostapplication.exe.config#5)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/iendpointbehavior/cs/hostapplication.exe.config" id="Snippet5"::: ]]> diff --git a/xml/System.ServiceModel.Description/IPolicyExportExtension.xml b/xml/System.ServiceModel.Description/IPolicyExportExtension.xml index 2cab529da80..7b72675a2fa 100644 --- a/xml/System.ServiceModel.Description/IPolicyExportExtension.xml +++ b/xml/System.ServiceModel.Description/IPolicyExportExtension.xml @@ -35,21 +35,21 @@ ## Examples The following code example shows the implementation of on a . In this example, a custom binding element is attached to the WSDL file at the binding level. - [!code-csharp[CustomPolicySample#14](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs#14)] - [!code-vb[CustomPolicySample#14](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb#14)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs" id="Snippet14"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb" id="Snippet14"::: The following code example shows a implementation that enables the preceding policy exporter to be loaded from an application configuration file. - [!code-csharp[CustomPolicySample#15](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs#15)] - [!code-vb[CustomPolicySample#15](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb#15)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs" id="Snippet15"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb" id="Snippet15"::: The following example shows the host configuration file that loads the custom policy exporter. - [!code-xml[CustomPolicySample#3](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/app.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/app.config" id="Snippet3"::: The following example shows the custom assertion in the WSDL file. - [!code-xml[CustomPolicySample#16](~/snippets/common/VS_Snippets_CFX/custompolicysample/common/tempuri.org.wsdl#16)] + :::code language="xml" source="~/snippets/common/VS_Snippets_CFX/custompolicysample/common/tempuri.org.wsdl" id="Snippet16"::: ]]> @@ -90,21 +90,21 @@ ## Examples The following code example shows the implementation of on a . In this example, a custom binding element is attached to the WSDL file at the binding level. - [!code-csharp[CustomPolicySample#14](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs#14)] - [!code-vb[CustomPolicySample#14](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb#14)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs" id="Snippet14"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb" id="Snippet14"::: The following code example shows a implementation that enables the preceding policy exporter to be loaded from an application configuration file. - [!code-csharp[CustomPolicySample#15](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs#15)] - [!code-vb[CustomPolicySample#15](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb#15)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyexporter.cs" id="Snippet15"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyexporter.vb" id="Snippet15"::: The following example shows the host configuration file that loads the custom policy exporter. - [!code-xml[CustomPolicySample#3](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/app.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/app.config" id="Snippet3"::: The following example shows the custom assertion in the WSDL file. - [!code-xml[CustomPolicySample#16](~/snippets/common/VS_Snippets_CFX/custompolicysample/common/tempuri.org.wsdl#16)] + :::code language="xml" source="~/snippets/common/VS_Snippets_CFX/custompolicysample/common/tempuri.org.wsdl" id="Snippet16"::: ]]> diff --git a/xml/System.ServiceModel.Description/IPolicyImportExtension.xml b/xml/System.ServiceModel.Description/IPolicyImportExtension.xml index 0b7796accb6..fb07d3050f8 100644 --- a/xml/System.ServiceModel.Description/IPolicyImportExtension.xml +++ b/xml/System.ServiceModel.Description/IPolicyImportExtension.xml @@ -49,17 +49,17 @@ ## Examples The following code example shows the use of the method to locate, return, and remove the assertion in one step. - [!code-csharp[CustomPolicySample#1](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyimporter.cs#1)] - [!code-vb[CustomPolicySample#1](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyimporter.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyimporter.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyimporter.vb" id="Snippet1"::: The following code example shows the client application configuration file to load the custom policy importer when the is invoked. - [!code-xml[CustomPolicySample#7](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.exe.config#7)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.exe.config" id="Snippet7"::: The following code example shows the use of the to download and resolve metadata into description objects. - [!code-csharp[CustomPolicySample#10](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.cs#10)] - [!code-vb[CustomPolicySample#10](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/client.vb#10)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.cs" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/client.vb" id="Snippet10"::: ]]> @@ -112,17 +112,17 @@ ## Examples The following code example shows the use of the method to locate, return, and remove the assertion in one step. - [!code-csharp[CustomPolicySample#1](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyimporter.cs#1)] - [!code-vb[CustomPolicySample#1](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyimporter.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/policyimporter.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/policyimporter.vb" id="Snippet1"::: The following code example shows the client application configuration file to load the custom policy importer when the is invoked. - [!code-xml[CustomPolicySample#7](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.exe.config#7)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.exe.config" id="Snippet7"::: The following code example shows the use of the to download and resolve metadata into description objects. - [!code-csharp[CustomPolicySample#10](~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.cs#10)] - [!code-vb[CustomPolicySample#10](~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/client.vb#10)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/custompolicysample/cs/client.cs" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/custompolicysample/vb/client.vb" id="Snippet10"::: ]]> diff --git a/xml/System.ServiceModel.Description/IServiceBehavior.xml b/xml/System.ServiceModel.Description/IServiceBehavior.xml index 4de230e2112..5a709e368ce 100644 --- a/xml/System.ServiceModel.Description/IServiceBehavior.xml +++ b/xml/System.ServiceModel.Description/IServiceBehavior.xml @@ -47,12 +47,12 @@ The following implementation adds no binding parameter objects, adds the custom object to each property, and validates that each operation of the service to which the service behavior is applied and has a of type `GreetingFault`. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: In this example, the behavior class also implements , which enables the service behavior to be inserted by using it in an application configuration file, as the following code example demonstrates. - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> @@ -141,12 +141,12 @@ The following implementation adds no binding parameter objects, adds the custom object to each property, and validates that each operation of the service to which the service behavior is applied and has a of type `GreetingFault`. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: In this example, the behavior class also implements , which enables the service behavior to be inserted by using it in an application configuration file, as the following code example demonstrates. - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> @@ -192,12 +192,12 @@ The following implementation adds no binding parameter objects, adds the custom object to each property, and validates that each operation of the service to which the service behavior is applied and has a of type `GreetingFault`. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: In this example, the behavior class also implements , which enables the service behavior to be inserted by using it in an application configuration file, as the following code example demonstrates. - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> diff --git a/xml/System.ServiceModel.Description/IWsdlImportExtension.xml b/xml/System.ServiceModel.Description/IWsdlImportExtension.xml index 650871e743c..323ac941441 100644 --- a/xml/System.ServiceModel.Description/IWsdlImportExtension.xml +++ b/xml/System.ServiceModel.Description/IWsdlImportExtension.xml @@ -29,11 +29,11 @@ ## Examples The following code example shows the use of to add an and an (the `WsdlDocumentationImporter`, in this case) to modify generated WCF client code at the interface and operation level. - [!code-csharp[C_CustomWSDLExtensions#4](~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/wsdldocumentationimporter.cs#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/wsdldocumentationimporter.cs" id="Snippet4"::: The following code example shows how to configure the client metadata system to use the custom from an application configuration file. - [!code-xml[C_CustomWSDLExtensions#9](~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/client.exe.config#9)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/client.exe.config" id="Snippet9"::: ]]> @@ -110,11 +110,11 @@ ## Examples The following code example shows the use of to add an and an (the `WsdlDocumentationImporter`, in this case) to modify generated WCF client code at the interface and operation level. - [!code-csharp[C_CustomWSDLExtensions#4](~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/wsdldocumentationimporter.cs#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/wsdldocumentationimporter.cs" id="Snippet4"::: The following code example shows how to configure the client metadata system to use the custom from an application configuration file. - [!code-xml[C_CustomWSDLExtensions#9](~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/client.exe.config#9)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/client.exe.config" id="Snippet9"::: ]]> diff --git a/xml/System.ServiceModel.Description/PolicyConversionContext.xml b/xml/System.ServiceModel.Description/PolicyConversionContext.xml index 7b9961311d0..c667307c983 100644 --- a/xml/System.ServiceModel.Description/PolicyConversionContext.xml +++ b/xml/System.ServiceModel.Description/PolicyConversionContext.xml @@ -39,15 +39,15 @@ ## Examples The following code example shows an implementation of the method that writes all policy assertions to the console. The code comments describe how to locate a specific custom policy assertion, create and insert an implementing binding element, and remove the assertion from the collection. - [!code-csharp[S_UEPolicyConversionContext#0](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs#0)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs" id="Snippet0"::: The following code example shows how to register implementations using the `` configuration section. - [!code-xml[S_UEPolicyConversionContext#100](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/common/app.config#100)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/common/app.config" id="Snippet100"::: The following code example demonstrates how a custom binding element can implement to attach a custom policy assertion to the binding assertions. - [!code-csharp[S_UEPolicyConversionContext#1](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs" id="Snippet1"::: ]]> @@ -156,15 +156,15 @@ ## Examples The following code example shows an implementation of the method that writes all policy assertions to the console. The code comments describe how to locate a specific custom policy assertion, create and insert an implementing binding element, and remove the assertion from the collection. - [!code-csharp[S_UEPolicyConversionContext#0](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs#0)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs" id="Snippet0"::: The following code example shows how to register implementations using the `` configuration section. - [!code-xml[S_UEPolicyConversionContext#100](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/common/app.config#100)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/common/app.config" id="Snippet100"::: The following code example demonstrates how a custom binding element can implement to attach a custom policy assertion to the binding assertions. - [!code-csharp[S_UEPolicyConversionContext#1](~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uepolicyconversioncontext/cs/program.cs" id="Snippet1"::: ]]> diff --git a/xml/System.ServiceModel.Description/ServiceDebugBehavior.xml b/xml/System.ServiceModel.Description/ServiceDebugBehavior.xml index f26561d2287..94b9fbf67f1 100644 --- a/xml/System.ServiceModel.Description/ServiceDebugBehavior.xml +++ b/xml/System.ServiceModel.Description/ServiceDebugBehavior.xml @@ -64,7 +64,7 @@ - Add a [<serviceDebug>](/dotnet/framework/configure-apps/file-schema/wcf/servicedebug) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`. - [!code-xml[ServiceDebugBehaviorConfig#1](~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -192,7 +192,7 @@ - Add a [<serviceDebug>](/dotnet/framework/configure-apps/file-schema/wcf/servicedebug) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`. - [!code-xml[ServiceDebugBehaviorConfig#1](~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -444,7 +444,7 @@ - Add a [<serviceDebug>](/dotnet/framework/configure-apps/file-schema/wcf/servicedebug) element with the various attributes set to the desired configuration. In this case, the `httpHelpPageEnabled` and `includeExceptionDetailInFaults` attribute values are set to `true`. - [!code-xml[ServiceDebugBehaviorConfig#1](~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicedebugbehaviorconfig/cs/hostapplication.exe.config" id="Snippet1"::: ]]> diff --git a/xml/System.ServiceModel.Description/ServiceThrottlingBehavior.xml b/xml/System.ServiceModel.Description/ServiceThrottlingBehavior.xml index 81d72d8b21d..276e851bd06 100644 --- a/xml/System.ServiceModel.Description/ServiceThrottlingBehavior.xml +++ b/xml/System.ServiceModel.Description/ServiceThrottlingBehavior.xml @@ -44,7 +44,7 @@ ## Examples The following code example shows the use of from an application configuration file that sets the , , and properties to 1 as an example. Real-world experience determines what the optimal settings are for any particular application. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -116,7 +116,7 @@ ## Examples The following code example shows the use of from an application configuration file that sets the , , and properties to 1 as an example. Real-world experience determines what the optimal settings are for any particular application. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -154,7 +154,7 @@ ## Examples The following code example shows the use of from an application configuration file that sets the , and properties to 1 as an example. Real-world experience determines what the optimal settings are for any particular application. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -204,7 +204,7 @@ ## Examples The following code example shows the use of from an application configuration file that sets the , , and properties to 1 as an example. Real-world experience determines what the optimal settings are for any particular application. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> diff --git a/xml/System.ServiceModel.Description/TransactedBatchingBehavior.xml b/xml/System.ServiceModel.Description/TransactedBatchingBehavior.xml index 2b25afbf3bd..2f5a79cd353 100644 --- a/xml/System.ServiceModel.Description/TransactedBatchingBehavior.xml +++ b/xml/System.ServiceModel.Description/TransactedBatchingBehavior.xml @@ -31,11 +31,11 @@ ## Examples The following example shows how to add the transacted batching behavior to a service in a configuration file. - [!code-xml[UETransactedBatchingConfig#0](~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/common/serviceapp.config#0)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/common/serviceapp.config" id="Snippet0"::: The following example shows how to add the transacted batching behavior to a service in code. - [!code-csharp[UETransactedBatchingCode#0](~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/service.cs#0)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/service.cs" id="Snippet0"::: ]]> @@ -71,7 +71,7 @@ ## Examples The following code shows how to create a new instance of specifying the maximum number of messages to be processed in a batch. - [!code-csharp[UETransactedBatchingCode#1](~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/service.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/service.cs" id="Snippet1"::: ]]> @@ -115,7 +115,7 @@ ## Examples The following code shows how to set the property. - [!code-csharp[UETransactedBatchingCode#2](~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/snippets.cs#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uetransactedbatchingcode/cs/snippets.cs" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel.Dispatcher/ClientRuntime.xml b/xml/System.ServiceModel.Dispatcher/ClientRuntime.xml index 3f7797695ef..d34353219e0 100644 --- a/xml/System.ServiceModel.Dispatcher/ClientRuntime.xml +++ b/xml/System.ServiceModel.Dispatcher/ClientRuntime.xml @@ -99,12 +99,12 @@ ## Examples In the following code example an inserts a into the client runtime by adding it to the property. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: The following code example shows a configuration file that loads the endpoint behavior into the client endpoint. - [!code-xml[Interceptors#3](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config" id="Snippet3"::: ]]> @@ -465,8 +465,8 @@ ## Examples The following code example shows the use of an endpoint behavior to insert an interactive channel initializer. - [!code-csharp[IInteractiveChannelInitializer#10](~/snippets/csharp/VS_Snippets_CFX/iinteractivechannelinitializer/cs/insertingbehaviors.cs#10)] - [!code-vb[IInteractiveChannelInitializer#10](~/snippets/visualbasic/VS_Snippets_CFX/iinteractivechannelinitializer/vb/insertingbehaviors.vb#10)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iinteractivechannelinitializer/cs/insertingbehaviors.cs" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/iinteractivechannelinitializer/vb/insertingbehaviors.vb" id="Snippet10"::: ]]> @@ -612,12 +612,12 @@ ## Examples In the following code example an inserts a into the client runtime by adding it to the property. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: The following code example shows a configuration file that loads the endpoint behavior into the client endpoint. - [!code-xml[Interceptors#3](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config" id="Snippet3"::: ]]> @@ -707,8 +707,8 @@ ## Examples In the following code example an inserts a into the client runtime by adding it to each in the property. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel.Dispatcher/IClientMessageInspector.xml b/xml/System.ServiceModel.Dispatcher/IClientMessageInspector.xml index 4ffc72ef701..d0643702c04 100644 --- a/xml/System.ServiceModel.Dispatcher/IClientMessageInspector.xml +++ b/xml/System.ServiceModel.Dispatcher/IClientMessageInspector.xml @@ -53,17 +53,17 @@ ## Examples The following code example shows an implementation that writes strings to the console when the implementation is called. - [!code-csharp[Interceptors#1](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#1)] - [!code-vb[Interceptors#1](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet1"::: The following code example shows how to use an to insert the client message inspector in the client endpoint. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: Finally, the following code example shows how to modify the client configuration file to use the endpoint behavior with a particular endpoint. - [!code-xml[Interceptors#3](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config" id="Snippet3"::: ]]> @@ -118,17 +118,17 @@ ## Examples The following code example shows an implementation that writes strings to the console when the implementation is called. - [!code-csharp[Interceptors#1](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#1)] - [!code-vb[Interceptors#1](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet1"::: The following code example shows how to use an to insert the client message inspector in the client endpoint. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: Finally, the following code example shows how to modify the client configuration file to use the endpoint behavior with a particular endpoint. - [!code-xml[Interceptors#3](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config" id="Snippet3"::: ]]> @@ -184,17 +184,17 @@ ## Examples The following code example shows an implementation that writes strings to the console when the implementation is called. - [!code-csharp[Interceptors#1](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#1)] - [!code-vb[Interceptors#1](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet1"::: The following code example shows how to use an to insert the client message inspector in the client endpoint. - [!code-csharp[Interceptors#2](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#2)] - [!code-vb[Interceptors#2](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet2"::: Finally, the following code example shows how to modify the client configuration file to use the endpoint behavior with a particular endpoint. - [!code-xml[Interceptors#3](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/client.exe.config" id="Snippet3"::: ]]> diff --git a/xml/System.ServiceModel.Dispatcher/IDispatchMessageInspector.xml b/xml/System.ServiceModel.Dispatcher/IDispatchMessageInspector.xml index 3f27723e995..31b013ee6db 100644 --- a/xml/System.ServiceModel.Dispatcher/IDispatchMessageInspector.xml +++ b/xml/System.ServiceModel.Dispatcher/IDispatchMessageInspector.xml @@ -54,17 +54,17 @@ ## Examples The following code example shows a basic that writes a string to the console when it is invoked. - [!code-csharp[Interceptors#7](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#7)] - [!code-vb[Interceptors#7](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet7"::: The following code example shows the implementation of an that adds the `Inspector` to the collection. - [!code-csharp[Interceptors#8](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#8)] - [!code-vb[Interceptors#8](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet8"::: The following code example shows the use of an application configuration file to load the service behavior that inserts the `Inspector` . - [!code-xml[Interceptors#9](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config#9)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config" id="Snippet9"::: ]]> @@ -119,17 +119,17 @@ ## Examples The following code example shows a basic that writes a string to the console when it is invoked. - [!code-csharp[Interceptors#7](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#7)] - [!code-vb[Interceptors#7](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet7"::: The following code example shows the implementation of an that adds the `Inspector` to the collection. - [!code-csharp[Interceptors#8](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#8)] - [!code-vb[Interceptors#8](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet8"::: The following code example shows the use of an application configuration file to load the service behavior that inserts the `Inspector` . - [!code-xml[Interceptors#9](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config#9)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config" id="Snippet9"::: ]]> @@ -178,17 +178,17 @@ ## Examples The following code example shows a basic that writes a string to the console when it is invoked. - [!code-csharp[Interceptors#7](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs#7)] - [!code-vb[Interceptors#7](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet7"::: The following code example shows the implementation of an that adds the `Inspector` to the collection. - [!code-csharp[Interceptors#8](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs#8)] - [!code-vb[Interceptors#8](~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet8"::: The following code example shows the use of an application configuration file to load the service behavior that inserts the `Inspector` . - [!code-xml[Interceptors#9](~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config#9)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/hostapplication.exe.config" id="Snippet9"::: ]]> diff --git a/xml/System.ServiceModel.Dispatcher/IErrorHandler.xml b/xml/System.ServiceModel.Dispatcher/IErrorHandler.xml index 06dfc082605..35a18138b74 100644 --- a/xml/System.ServiceModel.Dispatcher/IErrorHandler.xml +++ b/xml/System.ServiceModel.Dispatcher/IErrorHandler.xml @@ -56,17 +56,17 @@ ## Examples The following code example demonstrates a service that implements that returns only of type `GreetingFault` when a service method throws a managed exception. - [!code-csharp[IErrorHandler#6](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#6)] - [!code-vb[IErrorHandler#6](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet6"::: The following code example shows how to use a service behavior to add the implementation to the property. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: The following code example shows how to configure the service to load the service behavior using an application configuration file. For more details about how to expose a service behavior in a configuration file, see . - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> @@ -126,17 +126,17 @@ ## Examples The following code example demonstrates a service that implements that returns only of type `GreetingFault` when a service method throws a managed exception. - [!code-csharp[IErrorHandler#6](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#6)] - [!code-vb[IErrorHandler#6](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet6"::: The following code example shows how to use a service behavior to add the implementation to the property. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: The following code example shows how to configure the service to load the service behavior using an application configuration file. For more details about how to expose a service behavior in a configuration file, see . - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> @@ -193,17 +193,17 @@ ## Examples The following code example demonstrates a service that implements that returns only of type `GreetingFault` when a service method throws a managed exception. - [!code-csharp[IErrorHandler#6](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#6)] - [!code-vb[IErrorHandler#6](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet6"::: The following code example shows how to use a service behavior to add the implementation to the property. - [!code-csharp[IErrorHandler#7](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs#7)] - [!code-vb[IErrorHandler#7](~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/ierrorhandler.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/ierrorhandler/vb/ierrorhandler.vb" id="Snippet7"::: The following code example shows how to configure the service to load the service behavior using an application configuration file. For more details about how to expose a service behavior in a configuration file, see . - [!code-xml[IErrorHandler#4](~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config#4)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/ierrorhandler/cs/hostapplication.exe.config" id="Snippet4"::: ]]> diff --git a/xml/System.ServiceModel.Dispatcher/ServiceThrottle.xml b/xml/System.ServiceModel.Dispatcher/ServiceThrottle.xml index 9e5f75de466..2015dac9c54 100644 --- a/xml/System.ServiceModel.Dispatcher/ServiceThrottle.xml +++ b/xml/System.ServiceModel.Dispatcher/ServiceThrottle.xml @@ -36,7 +36,7 @@ ## Examples The following code example shows the typical use of the by referencing the in an application configuration file. In this case, the values that are specified establish, at most, one message processing at one time from one connection to one . Real-world usage must be determined through experience. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -75,7 +75,7 @@ ## Examples The following code example shows the typical use of the by referencing the in an application configuration file. In this case, the values that are specified establish, at most, one message processing at one time from one connection to one . Real-world usage must be determined through experience. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -114,7 +114,7 @@ ## Examples The following code example shows the typical use of the by referencing the in an application configuration file. In this case, the values that are specified establish, at most, one message processing at one time from one connection to one . Real-world usage must be determined through experience. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> @@ -157,7 +157,7 @@ ## Examples The following code example shows the typical use of the by referencing the in an application configuration file. In this case, the values that are specified establish, at most, one message processing at one time from one connection to one . Real-world usage must be determined through experience. - [!code-xml[ServiceThrottlingBehavior#3](~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config#3)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicethrottlingbehavior/cs/hostapplication.exe.config" id="Snippet3"::: ]]> diff --git a/xml/System.ServiceModel.Security.Tokens/ClaimTypeRequirement.xml b/xml/System.ServiceModel.Security.Tokens/ClaimTypeRequirement.xml index e88b50a93de..2013f157c97 100644 --- a/xml/System.ServiceModel.Security.Tokens/ClaimTypeRequirement.xml +++ b/xml/System.ServiceModel.Security.Tokens/ClaimTypeRequirement.xml @@ -37,11 +37,11 @@ ## Examples The following code adds two claim type requirements to a security binding. - [!code-csharp[S_UEClaimTypeRequirement#1](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs" id="Snippet1"::: The following config file is used with the preceding code. - [!code-xml[S_UEClaimTypeRequirement#101](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/common/app.config#101)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/common/app.config" id="Snippet101"::: ]]> @@ -100,7 +100,7 @@ ## Examples The following code adds two claim type requirements to a security binding. - [!code-csharp[S_UEClaimTypeRequirement#1](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs" id="Snippet1"::: ]]> @@ -141,7 +141,7 @@ ## Examples The following code adds two claim type requirements to a security binding. - [!code-csharp[S_UEClaimTypeRequirement#1](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs" id="Snippet1"::: ]]> @@ -191,7 +191,7 @@ ## Examples The following code shows how to get this property. - [!code-csharp[S_UEClaimTypeRequirement#2](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs" id="Snippet2"::: ]]> @@ -242,7 +242,7 @@ ## Examples The following code shows how to get this property. - [!code-csharp[S_UEClaimTypeRequirement#2](~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueclaimtyperequirement/cs/client.cs" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel.Security/IssuedTokenServiceCredential.xml b/xml/System.ServiceModel.Security/IssuedTokenServiceCredential.xml index 53d505bdd6b..3a8c331dd41 100644 --- a/xml/System.ServiceModel.Security/IssuedTokenServiceCredential.xml +++ b/xml/System.ServiceModel.Security/IssuedTokenServiceCredential.xml @@ -80,8 +80,8 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#2](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)] - [!code-vb[c_FederatedService#2](~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb" id="Snippet2"::: ]]> @@ -154,8 +154,8 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#2](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)] - [!code-vb[c_FederatedService#2](~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb" id="Snippet2"::: ]]> @@ -192,11 +192,11 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#5](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet5"::: The custom validator referenced in the prior code is defined in the following code. - [!code-csharp[c_FederatedService#4](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet4"::: ]]> @@ -227,8 +227,8 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#2](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)] - [!code-vb[c_FederatedService#2](~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb" id="Snippet2"::: ]]> @@ -270,8 +270,8 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#2](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)] - [!code-vb[c_FederatedService#2](~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb" id="Snippet2"::: ]]> @@ -313,12 +313,12 @@ ## Examples The following code shows how to set this property. - [!code-csharp[S_UEIssuedTokenServiceCredential#1](~/snippets/csharp/VS_Snippets_CFX/s_ueissuedtokenservicecredential/cs/program.cs#1)] - [!code-vb[S_UEIssuedTokenServiceCredential#1](~/snippets/visualbasic/VS_Snippets_CFX/s_ueissuedtokenservicecredential/vb/module1.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_ueissuedtokenservicecredential/cs/program.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_ueissuedtokenservicecredential/vb/module1.vb" id="Snippet1"::: The property can also be set in a configuration file. - [!code-xml[S_UEIssuedTokenServiceCredential#100](~/snippets/csharp/VS_Snippets_CFX/s_ueissuedtokenservicecredential/common/app.config#100)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/s_ueissuedtokenservicecredential/common/app.config" id="Snippet100"::: ]]> @@ -356,8 +356,8 @@ ## Examples The following code shows one way to access and set this property. - [!code-csharp[c_FederatedService#2](~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)] - [!code-vb[c_FederatedService#2](~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel/ReceiveErrorHandling.xml b/xml/System.ServiceModel/ReceiveErrorHandling.xml index 90aebb9d3dd..0c55eb5fced 100644 --- a/xml/System.ServiceModel/ReceiveErrorHandling.xml +++ b/xml/System.ServiceModel/ReceiveErrorHandling.xml @@ -37,7 +37,7 @@ ## Examples The following configuration code illustrates how to set this property in the service configuration file: - [!code-xml[S_UE_MSMQ_Poison#5](~/snippets/xml/VS_Snippets_CFX/s_ue_msmq_poison/common/serviceapp.config#5)] + :::code language="xml" source="~/snippets/xml/VS_Snippets_CFX/s_ue_msmq_poison/common/serviceapp.config" id="Snippet5"::: ]]> diff --git a/xml/System.ServiceModel/ServiceBehaviorAttribute.xml b/xml/System.ServiceModel/ServiceBehaviorAttribute.xml index a5b7125a14f..5c148a341fb 100644 --- a/xml/System.ServiceModel/ServiceBehaviorAttribute.xml +++ b/xml/System.ServiceModel/ServiceBehaviorAttribute.xml @@ -79,12 +79,12 @@ Furthermore, at the operation level, the values indicate that the `TxWork` method automatically enlists in flowed transactions or creates a new transaction to do the work, and that the transaction is committed automatically if an unhandled exception does not occur. - [!code-csharp[OperationBehaviorAttribute1#2](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs#2)] - [!code-vb[OperationBehaviorAttribute1#2](~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb" id="Snippet2"::: The underlying binding must support flowed transactions for the following code example to execute properly. To support flowed transactions using the , for example, set the property to `true` in code or in an application configuration file. The following code example shows the configuration file for the preceding sample. - [!code-xml[OperationBehaviorAttribute1#1](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -306,7 +306,7 @@ public void MyMethod() ## Examples The following code example demonstrates the different between using , , and . This sample does not compile without a real implementation behind it, but does demonstrate the kind of threading guarantees that Windows Communication Foundation (WCF) makes and what that means for your operation code. - [!code-csharp[C_BestPractices-Concurrency#1](~/snippets/csharp/VS_Snippets_CFX/c_bestpractices-concurrency/cs/reentrantandmultiple.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_bestpractices-concurrency/cs/reentrantandmultiple.cs" id="Snippet1"::: ]]> @@ -459,7 +459,7 @@ public void MyMethod() ## Examples The following example shows the use of and an implementation of . In this sample, with set to `false`, the extra data that the client knows about is round-tripped back to the client. - [!code-csharp[DCAContainerNoValidation#1](~/snippets/csharp/VS_Snippets_CFX/dcacontainernovalidation/cs/services.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/dcacontainernovalidation/cs/services.cs" id="Snippet1"::: ]]> @@ -518,7 +518,7 @@ public void MyMethod() Setting this property to `true` can also be done using an application configuration file and the [<serviceDebug>](/dotnet/framework/configure-apps/file-schema/wcf/servicedebug) element, as the following code example shows. - [!code-xml[OperationBehaviorAttribute1#10](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config#10)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config" id="Snippet10"::: ## Examples @@ -532,12 +532,12 @@ public void MyMethod() Furthermore, at the operation level, the values indicate that the `TxWork` method automatically enlists in flowed transactions or creates a new transaction to do the work, and that the transaction is committed automatically if an unhandled exception does not occur. - [!code-csharp[OperationBehaviorAttribute1#2](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs#2)] - [!code-vb[OperationBehaviorAttribute1#2](~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb" id="Snippet2"::: The underlying binding must support flowed transactions for the following code example to execute properly. To support flowed transactions using the , for example, set the property to `true` in code or in an application configuration file. The following code example shows the configuration file for the preceding sample. - [!code-xml[OperationBehaviorAttribute1#1](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -598,12 +598,12 @@ public void MyMethod() Furthermore, at the operation level, the values indicate that the `TxWork` method automatically enlists in flowed transactions or creates a new transaction to do the work, and that the transaction is committed automatically if an unhandled exception does not occur. - [!code-csharp[OperationBehaviorAttribute1#2](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs#2)] - [!code-vb[OperationBehaviorAttribute1#2](~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/operationbehaviorattribute1/vb/services.vb" id="Snippet2"::: The underlying binding must support flowed transactions for the following code example to execute properly. To support flowed transactions using the , for example, set the property to `true` in code or in an application configuration file. The following code example shows the configuration file for the preceding sample. - [!code-xml[OperationBehaviorAttribute1#1](~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/operationbehaviorattribute1/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -768,12 +768,12 @@ public void MyMethod() ## Examples The following code example sets the transaction isolation level to , disables support for concurrent transactions, requires a flowed transaction from the operation call, and commits the transaction on the service automatically if no unhandled exception occurs. - [!code-csharp[SBA.Transactions#2](~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/services.cs#2)] - [!code-vb[SBA.Transactions#2](~/snippets/visualbasic/VS_Snippets_CFX/sba.transactions/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sba.transactions/vb/services.vb" id="Snippet2"::: The underlying binding must support flowed transactions for the following code example to execute properly. To support flowed transactions using the , for example, set the property to `true` in code or in an application configuration file. The following code example shows a configuration file for the preceding sample. - [!code-xml[SBA.Transactions#1](~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -1114,12 +1114,12 @@ public void MyMethod() ## Examples The following code example sets the transaction isolation level to , does not support concurrent transactions, requires a flowed transaction from the method call, and commits the transaction automatically if no unhandled exception occurs. - [!code-csharp[SBA.Transactions#2](~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/services.cs#2)] - [!code-vb[SBA.Transactions#2](~/snippets/visualbasic/VS_Snippets_CFX/sba.transactions/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sba.transactions/vb/services.vb" id="Snippet2"::: The underlying binding must support flowed transactions for the following code example to execute properly. To support flowed transactions using the , for example, set the property to `true` in code or in an application configuration file. The following code example shows a configuration file for the preceding sample. - [!code-xml[SBA.Transactions#1](~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/hostapplication.exe.config#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/sba.transactions/cs/hostapplication.exe.config" id="Snippet1"::: ]]> @@ -1162,8 +1162,8 @@ public void MyMethod() ## Examples The following configuration file specifies a transaction timeout period of three minutes. - [!code-csharp[SBA.TransactionTimeout#2](~/snippets/csharp/VS_Snippets_CFX/sba.transactiontimeout/cs/services.cs#2)] - [!code-vb[SBA.TransactionTimeout#2](~/snippets/visualbasic/VS_Snippets_CFX/sba.transactiontimeout/vb/services.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sba.transactiontimeout/cs/services.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sba.transactiontimeout/vb/services.vb" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel/ServiceContractAttribute.xml b/xml/System.ServiceModel/ServiceContractAttribute.xml index f21de3d3f3e..aec3d946ba1 100644 --- a/xml/System.ServiceModel/ServiceContractAttribute.xml +++ b/xml/System.ServiceModel/ServiceContractAttribute.xml @@ -96,17 +96,17 @@ The code example then implements that contract on the `SampleService` class. - [!code-csharp[ServiceContractAttribute#1](~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/services.cs#1)] - [!code-vb[ServiceContractAttribute#1](~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/services.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb" id="Snippet1"::: The following code example shows a simple configuration file for the preceding service that creates one endpoint. - [!code-xml[ServiceContractAttribute#2](~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/hostapplication.exe.config#2)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/hostapplication.exe.config" id="Snippet2"::: The following code example shows a simple client that invokes the preceding `SampleService`. - [!code-csharp[ServiceContractAttribute#3](~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/client.cs#3)] - [!code-vb[ServiceContractAttribute#3](~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/client.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb" id="Snippet3"::: ]]> @@ -216,8 +216,8 @@ ## Examples The following code example shows a service that specifies a callback contract, which indicates that a service of type `IDuplexHello` must have a correspondent that implements a service of type `IHelloCallbackContract`. In addition, `IHelloCallbackContract` implements a one-way callback method, enabling the service to call the client without waiting for a reply to support a distributed, event-driven client. - [!code-csharp[SCA.CallbackContract#1](~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs#1)] - [!code-vb[SCA.CallbackContract#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb" id="Snippet1"::: ]]> @@ -364,13 +364,13 @@ ## Examples The following code example shows how to use the and properties of the to set the corresponding values in WSDL. - [!code-csharp[SCA.Names#1](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs#1)] - [!code-vb[SCA.Names#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb" id="Snippet1"::: The following code example shows an Windows Communication Foundation (WCF) client for the preceding service that imported WSDL using the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe). This client uses a `HelloWorldProxy` client rather than a `SampleServiceProxy` client (as is the case with the sample in the Example section of ). - [!code-csharp[SCA.Names#3](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs#3)] - [!code-vb[SCA.Names#3](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb" id="Snippet3"::: ]]> @@ -421,13 +421,13 @@ ## Examples The following code example shows how to use the and properties of the to set the corresponding values in WSDL. - [!code-csharp[SCA.Names#1](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs#1)] - [!code-vb[SCA.Names#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb" id="Snippet1"::: The following code example shows an Windows Communication Foundation (WCF) client for the preceding service that imported WSDL using the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe). This client uses a `HelloWorldClient` client rather than a `SampleServiceClient` client (as is the case with the sample in the Example section of ). - [!code-csharp[SCA.Names#3](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs#3)] - [!code-vb[SCA.Names#3](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb" id="Snippet3"::: ]]> @@ -561,8 +561,8 @@ ## Examples The following service contract requires that configured bindings use sessions when interacting with `SampleDuplexHello` service implementations. - [!code-csharp[SCA.Session#1](~/snippets/csharp/VS_Snippets_CFX/sca.session/cs/services.cs#1)] - [!code-vb[SCA.Session#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.session/cs/services.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web.ApplicationServices/AuthenticatingEventArgs.xml b/xml/System.Web.ApplicationServices/AuthenticatingEventArgs.xml index f1ac845cee3..aaf97ceb50f 100644 --- a/xml/System.Web.ApplicationServices/AuthenticatingEventArgs.xml +++ b/xml/System.Web.ApplicationServices/AuthenticatingEventArgs.xml @@ -33,8 +33,8 @@ ## Examples The following example shows an event handler that passes the and values to a custom membership provider to validate the user credentials. The event handler sets to the return value of the method and sets to `true` so that the class does not validate the credentials. - [!code-csharp[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax" id="Snippet2"::: ]]> @@ -82,8 +82,8 @@ ## Examples The following example shows an event handler that passes and values to a custom membership provider to validate the user credentials. The event handler sets to the return value of the method and sets to `true` so that the class does not validate the credentials. - [!code-csharp[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax" id="Snippet2"::: ]]> @@ -133,8 +133,8 @@ ## Examples The following example shows an event handler that passes and values to a custom membership provider to validate the user credentials. The event handler sets to the return value of the method and sets to `true` so that the class does not validate the credentials. - [!code-csharp[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax" id="Snippet2"::: ]]> @@ -179,8 +179,8 @@ ## Examples The following example shows an event handler for the event that parses two authentication values from the property. It passes the two values and the user name and password to a custom authentication class named `StudentAuthentication`. - [!code-csharp[System.Web.Security.LoginService_MultipleCredentials#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_MultipleCredentials#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax" id="Snippet2"::: ]]> @@ -223,8 +223,8 @@ ## Examples The following example shows an event handler that passes and values to a custom membership provider to validate the user credentials. The event handler sets to the return value of the method and sets to `true` so that the class does not validate the credentials. - [!code-csharp[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax" id="Snippet2"::: ]]> @@ -267,8 +267,8 @@ ## Examples The following example shows an event handler that selects a membership provider to use based on the value of the property. The handler passes and values to the custom membership provider to validate the user credentials. It sets to the return value of the method and sets to `true` so that the class does not validate the credentials. - [!code-csharp[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_NonDefaultProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_NonDefaultProvider/vb/Global.asax" id="Snippet2"::: ]]> diff --git a/xml/System.Web.ApplicationServices/AuthenticationService.xml b/xml/System.Web.ApplicationServices/AuthenticationService.xml index 966baef9bb2..c63e743f8b4 100644 --- a/xml/System.Web.ApplicationServices/AuthenticationService.xml +++ b/xml/System.Web.ApplicationServices/AuthenticationService.xml @@ -97,13 +97,13 @@ ## Examples The following example shows how to bind an event handler for the event in the `Application_Start` method of the Global.asax file. - [!code-csharp[System.Web.Security.LoginService_MultipleCredentials#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax#1)] - [!code-vb[System.Web.Security.LoginService_MultipleCredentials#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax" id="Snippet1"::: The following example shows an event handler for the event in the Global.asax file. The event handler reads two authentication values from the property and passes them together with the user name and password to a custom authentication class named `StudentAuthentication`. - [!code-csharp[System.Web.Security.LoginService_MultipleCredentials#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService_MultipleCredentials#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService_MultipleCredentials/vb/Global.asax" id="Snippet2"::: ]]> @@ -140,13 +140,13 @@ ## Examples The following example shows how to bind an event handler to the event in the `Application_Start` method of the Global.asax file. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#1)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet1"::: The following example shows an event handler for the event in the Global.asax file. The event handler customizes the authentication cookie by adding the value in the property to the property. Store the property in a cookie only if you know that the data in the property is not sensitive. Malicious users can access the values in the cookie. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> diff --git a/xml/System.Web.ApplicationServices/CreatingCookieEventArgs.xml b/xml/System.Web.ApplicationServices/CreatingCookieEventArgs.xml index 4c45cda4037..15bcc37e472 100644 --- a/xml/System.Web.ApplicationServices/CreatingCookieEventArgs.xml +++ b/xml/System.Web.ApplicationServices/CreatingCookieEventArgs.xml @@ -31,8 +31,8 @@ ## Examples The following example shows an event handler for the event. The handler retrieves user values from the object to customize the authentication cookie. The handler saves the value from the property in the authentication ticket and sets the property to `true` to indicate that the authentication cookie has been created. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> @@ -80,8 +80,8 @@ ## Examples The following example shows an event handler for the event. The handler retrieves user values from the object to customize the authentication cookie. The property is set to `true` after the authentication ticket is created. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> @@ -127,8 +127,8 @@ > [!NOTE] > Store the property in a cookie only when you know that the data in the property is not sensitive. Malicious users can access the values in the cookie. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> @@ -171,8 +171,8 @@ ## Examples The following example shows an event handler for the event. The handler retrieves user values from the object in order to customize the authentication cookie. The property of the object is set to the value in the property. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> @@ -252,8 +252,8 @@ ## Examples The following example shows an event handler for the event. The handler retrieves user values from the object to customize the authentication cookie. The property is set to the values of the property. - [!code-csharp[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax#2)] - [!code-vb[System.Web.Security.LoginService.CreatingCookieEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/cs/Global.asax" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.LoginService.CreatingCookieEventArgs/vb/Global.asax" id="Snippet2"::: ]]> diff --git a/xml/System.Web.ApplicationServices/ProfileService.xml b/xml/System.Web.ApplicationServices/ProfileService.xml index 0eb9e8a8d1d..2085c7f02db 100644 --- a/xml/System.Web.ApplicationServices/ProfileService.xml +++ b/xml/System.Web.ApplicationServices/ProfileService.xml @@ -282,8 +282,8 @@ ## Examples The following example shows an event handler for the event. When the value passed for `FirstName` property is empty or `null`, the `FirstName` property is added to the collection. - [!code-csharp[System.Web.ApplicationServices.ProfileService#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax#1)] - [!code-vb[System.Web.ApplicationServices.ProfileService#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.ApplicationServices/RoleService.xml b/xml/System.Web.ApplicationServices/RoleService.xml index 95e3eae92a9..92e3344811d 100644 --- a/xml/System.Web.ApplicationServices/RoleService.xml +++ b/xml/System.Web.ApplicationServices/RoleService.xml @@ -185,8 +185,8 @@ ## Examples The following example shows how to bind an event handler to the event in the Global.asax file. The event handler determines at run time which role provider to use, based on the user name. - [!code-csharp[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.ApplicationServices/SelectingProviderEventArgs.xml b/xml/System.Web.ApplicationServices/SelectingProviderEventArgs.xml index 15c2caf8edd..a85eff3c188 100644 --- a/xml/System.Web.ApplicationServices/SelectingProviderEventArgs.xml +++ b/xml/System.Web.ApplicationServices/SelectingProviderEventArgs.xml @@ -31,8 +31,8 @@ ## Examples The following example shows an event handler for the event. The event handler uses the object to check the user name and to set the role provider to use. The event handler is bound to the event in the `Application_Start` method of the Global.asax file. - [!code-csharp[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax" id="Snippet1"::: ]]> @@ -79,8 +79,8 @@ ## Examples The following example shows an event handler for the event. The event handler uses the object to check the user name and to set the role provider to use. The event handler is bound to the event in the `Application_Start` method of the Global.asax file. - [!code-csharp[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax" id="Snippet1"::: ]]> @@ -123,8 +123,8 @@ ## Examples The following example shows an event handler for the event. The event handler uses the object to check the user name and set the role provider to use. The event handler is bound to the event in the `Application_Start` method of the Global.asax file. - [!code-csharp[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Security.SelectingProviderEventHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.SelectingProviderEventHandler/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.ApplicationServices/ValidatingPropertiesEventArgs.xml b/xml/System.Web.ApplicationServices/ValidatingPropertiesEventArgs.xml index 79c6a4c7b01..b100a70aa1b 100644 --- a/xml/System.Web.ApplicationServices/ValidatingPropertiesEventArgs.xml +++ b/xml/System.Web.ApplicationServices/ValidatingPropertiesEventArgs.xml @@ -27,8 +27,8 @@ ## Examples The following example shows an event handler for the event. When the value passed for `FirstName` property is empty or `null`, the `FirstName` property is added to the collection. - [!code-csharp[System.Web.ApplicationServices.ProfileService#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax#1)] - [!code-vb[System.Web.ApplicationServices.ProfileService#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax" id="Snippet1"::: ]]> @@ -70,8 +70,8 @@ ## Examples The following example shows an event handler for the event. When the value passed for `FirstName` property is empty or `null`, the `FirstName` property is added to the collection. - [!code-csharp[System.Web.ApplicationServices.ProfileService#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax#1)] - [!code-vb[System.Web.ApplicationServices.ProfileService#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax" id="Snippet1"::: ]]> @@ -113,8 +113,8 @@ ## Examples The following example shows an event handler for the event. When the value passed for `FirstName` property is empty or `null`, the `FirstName` property is added to the collection. - [!code-csharp[System.Web.ApplicationServices.ProfileService#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax#1)] - [!code-vb[System.Web.ApplicationServices.ProfileService#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ApplicationServices.ProfileService/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Caching/AggregateCacheDependency.xml b/xml/System.Web.Caching/AggregateCacheDependency.xml index c8d2e4b446d..77caeab6553 100644 --- a/xml/System.Web.Caching/AggregateCacheDependency.xml +++ b/xml/System.Web.Caching/AggregateCacheDependency.xml @@ -29,7 +29,7 @@ ## Examples The following code example uses the class to add a , named `XMLDataSet`, to the cache that is dependent on a text file and an XML file. - [!code-vb[CachingSamples_AggregateCacheDependency1#1](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet1"::: ]]> @@ -61,7 +61,7 @@ ## Examples The following code example creates an instance of the class, using the constructor that takes no arguments. Two objects are created, then added to a array, `myDepArray`. This constructor is used in conjunction with the method to make the item stored in the dependent on both objects. - [!code-vb[CachingSamples_AggregateCacheDependency1#3](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#3)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet3"::: ]]> @@ -102,7 +102,7 @@ ## Examples The following code example uses the method in conjunction with the constructor to create two objects, add them to a array named `myDepArray`, and then make the item in the cache dependent on those two objects. - [!code-vb[CachingSamples_AggregateCacheDependency1#3](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#3)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet3"::: ]]> @@ -190,7 +190,7 @@ ## Examples The following code example uses the method to create and display an identifier for an instance of the class, named `aggDep`, once it is created and populated. - [!code-vb[CachingSamples_AggregateCacheDependency1#3](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#3)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.Caching/Cache.xml b/xml/System.Web.Caching/Cache.xml index cfa6f7b19d8..1f34b860936 100644 --- a/xml/System.Web.Caching/Cache.xml +++ b/xml/System.Web.Caching/Cache.xml @@ -129,8 +129,8 @@ > [!NOTE] > For examples of how to use the class and the delegate, see [Caching Application Data](https://learn.microsoft.com/previous-versions/aspnet/6hbbsfk6(v=vs.100)). - [!code-csharp[System.Web.Caching Examples#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx#3)] - [!code-vb[System.Web.Caching Examples#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx" id="Snippet3"::: ]]> @@ -174,8 +174,8 @@ ## Examples The following example obtains the value of the `Count` property, converts it to a string, and assigns the string to the property of a Web server control, `Label1`. - [!code-csharp[System.Web.Caching.Cache.Count#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.Cache.Count/CS/cachecountcs.aspx#1)] - [!code-vb[System.Web.Caching.Cache.Count#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.Cache.Count/VB/cachecountvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.Cache.Count/CS/cachecountcs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.Cache.Count/VB/cachecountvb.aspx" id="Snippet1"::: ]]> @@ -281,8 +281,8 @@ ## Examples The following example demonstrates how to retrieve the value cached for an ASP.NET text box server control. - [!code-csharp[Classic Cache.Get Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Get Example/CS/source.cs#1)] - [!code-vb[Classic Cache.Get Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Get Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Get Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Get Example/VB/source.vb" id="Snippet1"::: ]]> @@ -321,8 +321,8 @@ ## Examples The following example creates an object, `CacheEnum`, using the `GetEnumerator` method. The enumerator moves through the cache, converts the value of each cached item to a string, and then writes the values to a Web Forms page. - [!code-csharp[Cache.GetEnumerator#1](~/snippets/csharp/VS_Snippets_WebNet/Cache.GetEnumerator/CS/getenumcs.aspx#1)] - [!code-vb[Cache.GetEnumerator#1](~/snippets/visualbasic/VS_Snippets_WebNet/Cache.GetEnumerator/VB/getenumvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Cache.GetEnumerator/CS/getenumcs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Cache.GetEnumerator/VB/getenumvb.aspx" id="Snippet1"::: ]]> @@ -373,8 +373,8 @@ ## Examples The following example demonstrates how to insert an item into an application's cache. - [!code-csharp[Classic Cache.Insert Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert Example/CS/source.cs#1)] - [!code-vb[Classic Cache.Insert Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert Example/VB/source.vb" id="Snippet1"::: ]]> @@ -420,8 +420,8 @@ ## Examples The following example demonstrates how to insert an item into an application's cache with a cache dependency on an XML configuration file. - [!code-csharp[Classic Cache.Insert1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert1 Example/CS/source.cs#1)] - [!code-vb[Classic Cache.Insert1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -476,13 +476,13 @@ > [!NOTE] > Since this form of the `Insert` method supports cache dependencies, if the item has no dependencies, you must declare the `dependency` parameter as `null` (`Nothing` in Visual Basic) in the comma-delimited list of parameters. - [!code-csharp[Classic Cache.Insert2 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert2 Example/CS/source.cs#1)] - [!code-vb[Classic Cache.Insert2 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert2 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert2 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert2 Example/VB/source.vb" id="Snippet1"::: The following example demonstrates how to insert an item into the cache with a sliding expiration. - [!code-csharp[Classic Cache.Insert2 Example#2](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert2 Example/CS/source.cs#2)] - [!code-vb[Classic Cache.Insert2 Example#2](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert2 Example/VB/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert2 Example/CS/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert2 Example/VB/source.vb" id="Snippet2"::: ]]> @@ -603,8 +603,8 @@ > [!NOTE] > For more information about how to use this method with the delegate, see [How to: Notify an Application When an Item Is Removed from the Cache](https://learn.microsoft.com/previous-versions/aspnet/7kxdx246(v=vs.100)). - [!code-csharp[Classic Cache.Insert3 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert3 Example/CS/source.cs#1)] - [!code-vb[Classic Cache.Insert3 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert3 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.Insert3 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.Insert3 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -663,13 +663,13 @@ ## Examples The following example uses the `Item` property to retrieve the value of a cached object associated with the `Key1` key. It then uses the method to write the value and introductory text and the B HTML element to a Web Forms page. - [!code-csharp[System.Web.Caching Examples#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx#5)] - [!code-vb[System.Web.Caching Examples#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx" id="Snippet5"::: The following example demonstrates using this property to insert the value of a text box into the cache. - [!code-csharp[Classic Cache.this Example#2](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.this Example/CS/source.cs#2)] - [!code-vb[Classic Cache.this Example#2](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.this Example/VB/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.this Example/CS/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.this Example/VB/source.vb" id="Snippet2"::: ]]> @@ -706,8 +706,8 @@ ## Examples The following example demonstrates how to use the `NoAbsoluteExpiration` field to disable absolute expirations when inserting an item in the `Cache`. - [!code-csharp[Classic Cache.NoAbsoluteExpiration Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.NoAbsoluteExpiration Example/CS/source.cs#1)] - [!code-vb[Classic Cache.NoAbsoluteExpiration Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.NoAbsoluteExpiration Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.NoAbsoluteExpiration Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.NoAbsoluteExpiration Example/VB/source.vb" id="Snippet1"::: ]]> @@ -745,8 +745,8 @@ ## Examples The following example demonstrates how to use the Insert method to add an item to the object using the `NoSlidingExpiration` field. - [!code-csharp[Classic Cache.NoSlidingExpiration Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.NoSlidingExpiration Example/CS/source.cs#1)] - [!code-vb[Classic Cache.NoSlidingExpiration Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.NoSlidingExpiration Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.NoSlidingExpiration Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.NoSlidingExpiration Example/VB/source.vb" id="Snippet1"::: ]]> @@ -784,8 +784,8 @@ ## Examples The following example creates a `RemoveItemFromCache` method. When this method is called, it uses the property to check whether the cache contains an object that is associated with a `Key1` key value. If it does, the `Remove` method is called to remove the object. - [!code-csharp[System.Web.Caching Examples#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx#4)] - [!code-vb[System.Web.Caching Examples#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.Caching/CacheDependency.xml b/xml/System.Web.Caching/CacheDependency.xml index 3b76eb4d40e..de4084c1f2b 100644 --- a/xml/System.Web.Caching/CacheDependency.xml +++ b/xml/System.Web.Caching/CacheDependency.xml @@ -40,8 +40,8 @@ ## Examples The following code example demonstrates using the property to determine whether a changed since the previous request for an item in the . The `dt` value passed in the `start` parameter is set to . - [!code-csharp[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx#1)] - [!code-vb[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx" id="Snippet1"::: ]]> @@ -88,7 +88,7 @@ ## Examples The following code example is a class that implements this version of the constructor as all classes that derive from are required to. - [!code-vb[CacheDependency_Whidbey_Example1#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb" id="Snippet1"::: ]]> @@ -130,13 +130,13 @@ ## Examples The following code example creates an instance of the class with a dependency on an XML file. The method then adds an item to the that is dependent upon that file. - [!code-csharp[Classic CacheDependency.CacheDependency Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic CacheDependency.CacheDependency Example/CS/source.cs#1)] - [!code-vb[Classic CacheDependency.CacheDependency Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic CacheDependency.CacheDependency Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic CacheDependency.CacheDependency Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic CacheDependency.CacheDependency Example/VB/source.vb" id="Snippet1"::: You can also use the following technique to add an item to the with a dependency on a file. - [!code-csharp[Single File Dependency Cache entry#1](~/snippets/csharp/VS_Snippets_WebNet/Single File Dependency Cache entry/CS/DependencySingleFilecs.aspx#1)] - [!code-vb[Single File Dependency Cache entry#1](~/snippets/visualbasic/VS_Snippets_WebNet/Single File Dependency Cache entry/VB/DependencySingleFilevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Single File Dependency Cache entry/CS/DependencySingleFilecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Single File Dependency Cache entry/VB/DependencySingleFilevb.aspx" id="Snippet1"::: ]]> @@ -182,8 +182,8 @@ ## Examples The following code example demonstrates how to use the method to add an item to the with dependencies on an array of files. You can also make the item dependent on an array of directories. - [!code-csharp[Multiple file based dependency#1](~/snippets/csharp/VS_Snippets_WebNet/Multiple file based dependency/CS/DependencyMultiFilecs.aspx#1)] - [!code-vb[Multiple file based dependency#1](~/snippets/visualbasic/VS_Snippets_WebNet/Multiple file based dependency/VB/DependencyMultiFilevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Multiple file based dependency/CS/DependencyMultiFilecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Multiple file based dependency/VB/DependencyMultiFilevb.aspx" id="Snippet1"::: ]]> @@ -229,8 +229,8 @@ ## Examples The following code example uses this constructor to instantiate a object, then inserts an item into the with that dependency. The `dt` value passed in the `start` parameter is set to . - [!code-csharp[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx#1)] - [!code-vb[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx" id="Snippet1"::: ]]> @@ -277,8 +277,8 @@ ## Examples The following code example creates a object that passes two XML files and a value when the object is included as a parameter argument in an method call. - [!code-csharp[CacheDependency Constructor4#1](~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor4/CS/depmultifilestimecs.aspx#1)] - [!code-vb[CacheDependency Constructor4#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor4/VB/depmultifilestimevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor4/CS/depmultifilestimecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor4/VB/depmultifilestimevb.aspx" id="Snippet1"::: ]]> @@ -321,8 +321,8 @@ ## Examples The following code fragment demonstrates how to insert an item into your application's with a dependency on a key to another item placed in the cache. Since this method uses array syntax, you must define the number of keys on which the item you are adding to the is dependent. - [!code-csharp[Key based dependency#1](~/snippets/csharp/VS_Snippets_WebNet/Key based dependency/CS/DependencyKeycs.aspx#1)] - [!code-vb[Key based dependency#1](~/snippets/visualbasic/VS_Snippets_WebNet/Key based dependency/VB/DependencyKeyvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Key based dependency/CS/DependencyKeycs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Key based dependency/VB/DependencyKeyvb.aspx" id="Snippet1"::: ]]> @@ -372,8 +372,8 @@ ## Examples The following code example creates a `CreateDependency` method. When this method is called, it creates a object and the property is used to add an item to the cache with a `key` parameter of `key1` and a value of `Value 1`. An array of strings, `dependencyKey`, is then created with the value of `key1` as well. This constructor then instantiates a object that passes `dependencyKey` and the object as parameter arguments. The method is called next, using the object as a parameter. This makes the object added to the cache using the method dependent on the `key1` key. - [!code-csharp[CacheDependency Constructor6#1](~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor6/CS/depkeytimecs.aspx#1)] - [!code-vb[CacheDependency Constructor6#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor6/VB/depkeytimevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor6/CS/depkeytimecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor6/VB/depkeytimevb.aspx" id="Snippet1"::: ]]> @@ -419,8 +419,8 @@ ## Examples The following code example creates a `CreateDependency` method. When this method is called, it uses the property to add an item to the cache with a `key` parameter of `key1` and a value of `Value 1`. An array of strings, `dependencyKey`, is then created with the value of `key1` as well. The constructor is used to create a object, `dep1`, which passes `dependencyKey` as a parameter argument. A second object, `dep2`, is created using this constructor, with `dep1` passed as the third parameter argument. This second dependency is dependent on the first. The method is called next, using the second object as a parameter. If the first dependency changes in any way, the cached item will be invalidated. - [!code-csharp[CacheDependency Constructor7#1](~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor7/CS/dependencycs.aspx#1)] - [!code-vb[CacheDependency Constructor7#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor7/VB/dependencyvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor7/CS/dependencycs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor7/VB/dependencyvb.aspx" id="Snippet1"::: ]]> @@ -470,8 +470,8 @@ ## Examples The following code example shows a `CreateDependency` method. When this method is called, it creates a object and the property is used to add an item to the cache with a key parameter of `key1` and a value of `Value 1`. An array of strings, `dependencyKey`, is then created with the value at its first (and only) index set to the value of `key1` as well. The constructor is then used to create a object, `dep1`, which passes `dependencyKey` as a parameter argument. A second object, `dep2`, is then created using this constructor, with `dep1` and the object passed as parameter arguments. This second dependency is dependent on the first, and dependency monitoring will begin 10 seconds after the `CreateDependency` method is called. The method is called next, using the second object as a parameter. If the first dependency changes in any way, the cached item will be invalidated. - [!code-csharp[CacheDependency Constructor8#1](~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor8/CS/dependencytimecs.aspx#1)] - [!code-vb[CacheDependency Constructor8#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor8/VB/dependencytimevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CacheDependency Constructor8/CS/dependencytimecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency Constructor8/VB/dependencytimevb.aspx" id="Snippet1"::: ]]> @@ -510,7 +510,7 @@ ## Examples The following code example shows a class that inherits from the class and overrides the method. When this method is called, it sets a custom Boolean property named `Disposed` to `true`. - [!code-vb[CacheDependency_Whidbey_Example1#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb" id="Snippet1"::: ]]> @@ -635,7 +635,7 @@ ## Examples The following code example creates an object, named `aggDep`, with two objects in its array. Once `aggDep` is instantiated, the code calls the method to generate a unique identifier for both dependencies that `aggDep` contains and displays the identifiers to the containing page. An item is then added to the , using the method, with `aggDep` as a dependency. - [!code-vb[CachingSamples_AggregateCacheDependency1#3](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#3)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet3"::: ]]> @@ -674,8 +674,8 @@ ## Examples The following code example demonstrates using the property to determine whether a changed since the previous request for an item in the . The `dt` value passed in the `start` parameter is set to . - [!code-csharp[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx#1)] - [!code-vb[System.Web.Caching.CacheDependency_HasChanged#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/CS/t.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.CacheDependency_HasChanged/VB/t.vb.aspx" id="Snippet1"::: ]]> @@ -763,7 +763,7 @@ ## Examples The following code example shows a class that inherits from the class. It creates a public method, `ResetDependency`, that uses the method to change the time at which the dependency was modified, and then calls the method. - [!code-vb[CacheDependency_Whidbey_Example1#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb" id="Snippet1"::: ]]> @@ -824,7 +824,7 @@ ## Examples The following code example shows a class that inherits from the class. It creates a public method, `ResetDependency`, that uses the method to change the time at which the dependency was modified, and then calls the method. - [!code-vb[CacheDependency_Whidbey_Example1#1](~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CacheDependency_Whidbey_Example1/VB/cachedependencysample.vb" id="Snippet1"::: ]]> @@ -899,7 +899,7 @@ ## Examples The following code example uses the class to add an item, with two object dependencies, to the . When a request for the item is made, the code checks whether the item is in the . If it is, the property is converted to a string and displayed on the page. If it is not, the item and its two dependencies are created and added to the . - [!code-vb[CachingSamples_AggregateCacheDependency1#2](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx#2)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_AggregateCacheDependency1/VB/aggregatecachedependencysamplevb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Caching/CacheItemRemovedReason.xml b/xml/System.Web.Caching/CacheItemRemovedReason.xml index 5e0283f9b25..c73cc9c462c 100644 --- a/xml/System.Web.Caching/CacheItemRemovedReason.xml +++ b/xml/System.Web.Caching/CacheItemRemovedReason.xml @@ -27,8 +27,8 @@ ## Examples The following code example demonstrates a shared Boolean property, `itemRemoved`, a shared enumeration object, `reason`, and a delegate, `onRemove`. The latter can be included in an or method call. It also defines a method, `RemovedCallback`, with a signature that matches the delegate. When the `RemovedCallback` method is called, it changes the `itemRemoved` property value to `true` and assigns the `reason` property value to the reason provided by the enumeration. - [!code-csharp[System.Web.Caching Examples#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx#2)] - [!code-vb[System.Web.Caching Examples#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching Examples/CS/cachecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching Examples/VB/cachevb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Caching/SqlCacheDependency.xml b/xml/System.Web.Caching/SqlCacheDependency.xml index af31f17fc49..26cc6e68c48 100644 --- a/xml/System.Web.Caching/SqlCacheDependency.xml +++ b/xml/System.Web.Caching/SqlCacheDependency.xml @@ -172,8 +172,8 @@ ## Examples The following code example uses this constructor to create an instance of the class that is associated with a database table named Categories in a SQL Server database named Northwind. - [!code-csharp[CachingSamples_SqlCacheDependency#2](~/snippets/csharp/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/CS/sqlcachedepsamplecs.aspx#2)] - [!code-vb[CachingSamples_SqlCacheDependency#2](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/VB/sqlcachedepsamplevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/CS/sqlcachedepsamplecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/VB/sqlcachedepsamplevb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Caching/SqlCacheDependencyAdmin.xml b/xml/System.Web.Caching/SqlCacheDependencyAdmin.xml index 683a5ab74af..5b9e23b169c 100644 --- a/xml/System.Web.Caching/SqlCacheDependencyAdmin.xml +++ b/xml/System.Web.Caching/SqlCacheDependencyAdmin.xml @@ -40,8 +40,8 @@ The second sample is the code-behind file containing the source code for the page events. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#1)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet1"::: ]]> @@ -90,7 +90,7 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-vb[CachingSamples_SqlCacheDependencyAdmin#1](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependencyAdmin/VB/sqlcachedep2vb.aspx#1)] + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependencyAdmin/VB/sqlcachedep2vb.aspx" id="Snippet1"::: ]]> @@ -159,8 +159,8 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#7)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet7"::: ]]> @@ -274,8 +274,8 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#3)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet3"::: ]]> @@ -344,8 +344,8 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#7)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet7"::: ]]> @@ -402,8 +402,8 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#7)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet7"::: ]]> @@ -468,8 +468,8 @@ For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Caching.SqlCacheDependencyAdmin#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs#2)] - [!code-vb[System.Web.Caching.SqlCacheDependencyAdmin#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/CS/cacheDependencyAdmincs.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Caching.SqlCacheDependencyAdmin/VB/cacheDependencyAdminvb.aspx.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Caching/TableNotEnabledForNotificationException.xml b/xml/System.Web.Caching/TableNotEnabledForNotificationException.xml index 73ef904c07d..158e4a45600 100644 --- a/xml/System.Web.Caching/TableNotEnabledForNotificationException.xml +++ b/xml/System.Web.Caching/TableNotEnabledForNotificationException.xml @@ -28,8 +28,8 @@ ## Examples The following code example attempts to create a object and add an item to the with a dependency on the object. If the SQL Server database table is not enabled for dependency notifications, the is thrown and handled by calling the method. - [!code-csharp[CachingSamples_SqlCacheDependency#2](~/snippets/csharp/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/CS/sqlcachedepsamplecs.aspx#2)] - [!code-vb[CachingSamples_SqlCacheDependency#2](~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/VB/sqlcachedepsamplevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/CS/sqlcachedepsamplecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CachingSamples_SqlCacheDependency/VB/sqlcachedepsamplevb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Configuration/UrlMapping.xml b/xml/System.Web.Configuration/UrlMapping.xml index 331cdc54767..5b4d8ebfe50 100644 --- a/xml/System.Web.Configuration/UrlMapping.xml +++ b/xml/System.Web.Configuration/UrlMapping.xml @@ -123,8 +123,8 @@ ## Examples The following code example shows how to obtain the property. This example is from a larger example for the class. - [!code-csharp[System.Web.Configuration.UrlMapping2#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping2/cs/default.aspx#4)] - [!code-vb[System.Web.Configuration.UrlMapping2#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping2/vb/default.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping2/cs/default.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping2/vb/default.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.Profile/ProfileAutoSaveEventArgs.xml b/xml/System.Web.Profile/ProfileAutoSaveEventArgs.xml index b957d57db8a..55115d9451e 100644 --- a/xml/System.Web.Profile/ProfileAutoSaveEventArgs.xml +++ b/xml/System.Web.Profile/ProfileAutoSaveEventArgs.xml @@ -33,8 +33,8 @@ ## Examples The following code example shows the event included in the Global.asax file for an ASP.NET application. - [!code-csharp[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax#11)] - [!code-vb[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax" id="Snippet11"::: ]]> @@ -152,8 +152,8 @@ ## Examples The following code example shows the event included in the Global.asax file for an ASP.NET application. - [!code-csharp[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax#11)] - [!code-vb[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Profile/ProfileAutoSaveEventHandler.xml b/xml/System.Web.Profile/ProfileAutoSaveEventHandler.xml index 31909334f72..cbc99ff5038 100644 --- a/xml/System.Web.Profile/ProfileAutoSaveEventHandler.xml +++ b/xml/System.Web.Profile/ProfileAutoSaveEventHandler.xml @@ -41,8 +41,8 @@ ## Examples The following code example shows the event included in the Global.asax file for an ASP.NET application. - [!code-csharp[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax#11)] - [!code-vb[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Profile/ProfileEventArgs.xml b/xml/System.Web.Profile/ProfileEventArgs.xml index 29b8f27dcc7..0ab10832d87 100644 --- a/xml/System.Web.Profile/ProfileEventArgs.xml +++ b/xml/System.Web.Profile/ProfileEventArgs.xml @@ -27,8 +27,8 @@ ## Examples The following code example shows the event declared in the Global.asax file for an application. The event code loads a user profile based on role membership. - [!code-csharp[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax#12)] - [!code-vb[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax#12)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax" id="Snippet12"::: ]]> @@ -150,8 +150,8 @@ ## Examples The following code example shows the event declared in the Global.asax file for an application. The event code loads a user profile based on role membership. - [!code-csharp[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax#12)] - [!code-vb[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax#12)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax" id="Snippet12"::: ]]> diff --git a/xml/System.Web.Profile/ProfileEventHandler.xml b/xml/System.Web.Profile/ProfileEventHandler.xml index 64a07627cb5..5113872f9ed 100644 --- a/xml/System.Web.Profile/ProfileEventHandler.xml +++ b/xml/System.Web.Profile/ProfileEventHandler.xml @@ -37,8 +37,8 @@ ## Examples The following code example shows the event declared in the Global.asax file for an application. The event code loads a user profile for a user based on role membership. - [!code-csharp[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax#12)] - [!code-vb[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax#12)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax" id="Snippet12"::: ]]> diff --git a/xml/System.Web.Profile/ProfileMigrateEventArgs.xml b/xml/System.Web.Profile/ProfileMigrateEventArgs.xml index 4b9faf2419e..779395bab4a 100644 --- a/xml/System.Web.Profile/ProfileMigrateEventArgs.xml +++ b/xml/System.Web.Profile/ProfileMigrateEventArgs.xml @@ -55,8 +55,8 @@ The following code example shows the event included in the Global.asax file for an ASP.NET application. The event copies profile property values from the anonymous profile to the profile for the current user. - [!code-csharp[System.Web.Profile.ProfileManager#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax#1)] - [!code-vb[System.Web.Profile.ProfileManager#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax" id="Snippet1"::: ]]> @@ -162,8 +162,8 @@ The following code example shows the event included in the Global.asax file for an ASP.NET application. The event copies profile property values from the anonymous profile to the profile for the current user. - [!code-csharp[System.Web.Profile.ProfileManager#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax#1)] - [!code-vb[System.Web.Profile.ProfileManager#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Profile/ProfileMigrateEventHandler.xml b/xml/System.Web.Profile/ProfileMigrateEventHandler.xml index e622d27720f..c1b3478ef36 100644 --- a/xml/System.Web.Profile/ProfileMigrateEventHandler.xml +++ b/xml/System.Web.Profile/ProfileMigrateEventHandler.xml @@ -63,8 +63,8 @@ The following code example shows the event included in the Global.asax file for an ASP.NET application. The event copies profile property values from the anonymous profile to the profile for the current user. - [!code-csharp[System.Web.Profile.ProfileManager#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax#1)] - [!code-vb[System.Web.Profile.ProfileManager#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Profile/ProfileModule.xml b/xml/System.Web.Profile/ProfileModule.xml index ba3196f49aa..0f8c7033f01 100644 --- a/xml/System.Web.Profile/ProfileModule.xml +++ b/xml/System.Web.Profile/ProfileModule.xml @@ -63,8 +63,8 @@ The following code example shows the event included in the Global.asax file for an ASP.NET application. The event copies profile property values from the anonymous profile to the profile for the current user. - [!code-csharp[System.Web.Profile.ProfileManager#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax#1)] - [!code-vb[System.Web.Profile.ProfileManager#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax" id="Snippet1"::: ]]> @@ -231,8 +231,8 @@ The following code example shows the event included in the Global.asax file for an ASP.NET application. The event copies profile property values from the anonymous profile to the profile for the current user. - [!code-csharp[System.Web.Profile.ProfileManager#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax#1)] - [!code-vb[System.Web.Profile.ProfileManager#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager/VB/global.asax" id="Snippet1"::: ]]> @@ -270,8 +270,8 @@ ## Examples The following code example shows the event declared in the Global.asax file for an application. The event code loads a user profile for a user based on role membership. - [!code-csharp[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax#12)] - [!code-vb[System.Web.Profile.ProfileManager.Personalize#12](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax#12)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/CS/global.asax" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.Personalize/VB/global.asax" id="Snippet12"::: ]]> @@ -312,8 +312,8 @@ ## Examples The following code example shows the event included in the Global.asax file for an ASP.NET application. - [!code-csharp[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax#11)] - [!code-vb[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/CS/global.asax" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Profile/SqlProfileProvider.xml b/xml/System.Web.Profile/SqlProfileProvider.xml index f4555eb4647..b3a60074778 100644 --- a/xml/System.Web.Profile/SqlProfileProvider.xml +++ b/xml/System.Web.Profile/SqlProfileProvider.xml @@ -703,8 +703,8 @@ aspnet_regsql.exe -A p ## Examples The following code example lists the profile properties and values identified in the current profile. - [!code-csharp[System.Web.Profile.SqlProfileProvider#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/CS/getpropertyvaluescs.aspx#1)] - [!code-vb[System.Web.Profile.SqlProfileProvider#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/VB/getpropertyvaluesvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/CS/getpropertyvaluescs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/VB/getpropertyvaluesvb.aspx" id="Snippet1"::: ]]> @@ -797,8 +797,8 @@ aspnet_regsql.exe -A p ## Examples The following code example uses the method to modify profile property values. - [!code-csharp[System.Web.Profile.SqlProfileProvider#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/CS/setpropertyvaluescs.aspx#2)] - [!code-vb[System.Web.Profile.SqlProfileProvider#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/VB/setpropertyvaluesvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/CS/setpropertyvaluescs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.SqlProfileProvider/VB/setpropertyvaluesvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Routing/HttpMethodConstraint.xml b/xml/System.Web.Routing/HttpMethodConstraint.xml index 7cd1bd82596..b8a21011bd4 100644 --- a/xml/System.Web.Routing/HttpMethodConstraint.xml +++ b/xml/System.Web.Routing/HttpMethodConstraint.xml @@ -47,8 +47,8 @@ ## Examples The following example shows a object whose property contains an item that has a key named `httpMethod` and that has a value that is an instance of the class. - [!code-csharp[System.Web.Routing.Route.Constraints#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.Constraints#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax" id="Snippet1"::: ]]> @@ -90,8 +90,8 @@ ## Examples The following example shows a object whose property contains an item that has a key named `httpMethod` and that has a value that is an instance of the class. - [!code-csharp[System.Web.Routing.Route.Constraints#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.Constraints#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Routing/Route.xml b/xml/System.Web.Routing/Route.xml index 3ee7f75f042..980fa6304bf 100644 --- a/xml/System.Web.Routing/Route.xml +++ b/xml/System.Web.Routing/Route.xml @@ -43,8 +43,8 @@ ## Examples The following example shows how to create a object and add it to the property. - [!code-csharp[System.Web.Routing.RouteTable.Routes#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.RouteTable.Routes#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax" id="Snippet1"::: ]]> @@ -90,8 +90,8 @@ ## Examples The following example shows how to create a object and add it to the property. - [!code-csharp[System.Web.Routing.RouteTable.Routes#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.RouteTable.Routes#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax" id="Snippet1"::: ]]> @@ -249,13 +249,13 @@ ## Examples The following example shows how to create a object and set the , , and properties. - [!code-csharp[System.Web.Routing.Route.ctor#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.ctor#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax" id="Snippet1"::: The following example shows a object whose property contains a parameter named `httpMethod` with an instance of the class for the value. - [!code-csharp[System.Web.Routing.Route.Constraints#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.Constraints#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Constraints/vb/Global.asax" id="Snippet1"::: ]]> @@ -305,8 +305,8 @@ ## Examples The following example shows how to create a object and set the , , and properties. - [!code-csharp[System.Web.Routing.Route.ctor#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.ctor#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax" id="Snippet1"::: ]]> @@ -358,13 +358,13 @@ ## Examples The following example shows how to create a object and set the , , and properties. - [!code-csharp[System.Web.Routing.Route.ctor#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.ctor#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax" id="Snippet1"::: The following example shows a object whose property contains a parameter that is not part of the pattern in the property. - [!code-csharp[System.Web.Routing.Route.Defaults#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Defaults/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.Defaults#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Defaults/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.Defaults/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.Defaults/vb/Global.asax" id="Snippet1"::: ]]> @@ -545,8 +545,8 @@ ## Examples The following example shows how to set the property in the class constructor. The pattern contains the literal value "Category" for the first segment and URL parameters for the next two segments. - [!code-csharp[System.Web.Routing.RouteTable.Routes#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.RouteTable.Routes#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Routing/RouteCollection.xml b/xml/System.Web.Routing/RouteCollection.xml index 2e92593df80..f7031e19612 100644 --- a/xml/System.Web.Routing/RouteCollection.xml +++ b/xml/System.Web.Routing/RouteCollection.xml @@ -156,8 +156,8 @@ ## Examples The following example shows how to add a route to a object and assign a name to the route. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#1](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#1)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#1](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet1"::: ]]> @@ -493,8 +493,8 @@ ## Examples The default template for MVC projects uses this method to exclude .axd files from routing, as shown in the following example: - [!code-csharp[MvcDefaultApp#2](~/snippets/csharp/VS_Snippets_WebNet/mvcdefaultapp/cs/global.asax.cs#2)] - [!code-vb[MvcDefaultApp#2](~/snippets/visualbasic/VS_Snippets_WebNet/mvcdefaultapp/vb/global.asax.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/mvcdefaultapp/cs/global.asax.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/mvcdefaultapp/vb/global.asax.vb" id="Snippet2"::: ]]> @@ -687,8 +687,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define routes for a Web Forms application by using this method. The example shows a method named `RegisterRoutes` that is called from `Application_Start` in the Global.asax file. The method uses each overload of to add a route to the application. For more information about how to define routes for Web Forms applications, see [How to: Define Routes for Web Forms Applications](https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678). - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#122](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#122)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#122](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#122)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet122"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet122"::: ]]> @@ -741,8 +741,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define a route by using this method. The first statement defines a route that does not have a name. The second statement defines a named route. This example is part of a larger example that is available in the method overview. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#140](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#140)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#140](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#140)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet140"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet140"::: ]]> @@ -797,8 +797,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define a route by using this method. This example is part of a larger example that is available in the method overview. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#145](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#145)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#145](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#145)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet145"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet145"::: ]]> @@ -855,8 +855,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define a route by using this method. This example is part of a larger example that is available in the method overview. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#150](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#150)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#150](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#150)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet150"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet150"::: ]]> @@ -915,8 +915,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define a route by using this method. This example is part of a larger example that is available in the method overview. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#155](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#155)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#155](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#155)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet155"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet155"::: ]]> @@ -971,8 +971,8 @@ routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"}); ## Examples The following example shows how to define a route by using this method. This example is part of a larger example that is available in the method overview. - [!code-csharp[System.Web.Routing.RouteCollection.MapPageRoute#160](~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax#160)] - [!code-vb[System.Web.Routing.RouteCollection.MapPageRoute#160](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax#160)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/cs/global.asax" id="Snippet160"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.routing.routecollection.mappageroute/vb/global.asax" id="Snippet160"::: ]]> diff --git a/xml/System.Web.Routing/RouteTable.xml b/xml/System.Web.Routing/RouteTable.xml index 619621ad062..3ab647a800b 100644 --- a/xml/System.Web.Routing/RouteTable.xml +++ b/xml/System.Web.Routing/RouteTable.xml @@ -41,8 +41,8 @@ ## Examples The following example shows how to add a object to the property. - [!code-csharp[System.Web.Routing.RouteTable.Routes#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.RouteTable.Routes#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax" id="Snippet1"::: ]]> @@ -118,8 +118,8 @@ ## Examples The following example shows how to add a object to the property. - [!code-csharp[System.Web.Routing.RouteTable.Routes#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.RouteTable.Routes#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.RouteTable.Routes/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Routing/RouteValueDictionary.xml b/xml/System.Web.Routing/RouteValueDictionary.xml index d6765d48c9f..59d56f90e96 100644 --- a/xml/System.Web.Routing/RouteValueDictionary.xml +++ b/xml/System.Web.Routing/RouteValueDictionary.xml @@ -63,8 +63,8 @@ ## Examples The following example shows how to create a object and how to set the , , and properties. - [!code-csharp[System.Web.Routing.Route.ctor#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.ctor#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax" id="Snippet1"::: ]]> @@ -180,8 +180,8 @@ ## Examples The following example shows how to create a object and how to set the , , and properties. - [!code-csharp[System.Web.Routing.Route.ctor#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.Route.ctor#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.Route.ctor/VB/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Routing/StopRoutingHandler.xml b/xml/System.Web.Routing/StopRoutingHandler.xml index e32b44dea32..bd7acd5c669 100644 --- a/xml/System.Web.Routing/StopRoutingHandler.xml +++ b/xml/System.Web.Routing/StopRoutingHandler.xml @@ -43,8 +43,8 @@ ## Examples The following example shows how to prevent routing from handling requests for .axd requests. - [!code-csharp[System.Web.Routing.StopRoutingHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.StopRoutingHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/vb/Global.asax" id="Snippet1"::: ]]> @@ -81,8 +81,8 @@ ## Examples The following example shows how to prevent routing from handling requests for .axd files. - [!code-csharp[System.Web.Routing.StopRoutingHandler#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/cs/Global.asax#1)] - [!code-vb[System.Web.Routing.StopRoutingHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/vb/Global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/cs/Global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Routing.StopRoutingHandler/vb/Global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Script.Serialization/JavaScriptSerializer.xml b/xml/System.Web.Script.Serialization/JavaScriptSerializer.xml index 02e41250e53..9e6802b604e 100644 --- a/xml/System.Web.Script.Serialization/JavaScriptSerializer.xml +++ b/xml/System.Web.Script.Serialization/JavaScriptSerializer.xml @@ -58,11 +58,11 @@ To serialize an object, use the class to save and restore the state of an object by using JSON serialization. This code uses a custom converter that is provided for the class. @@ -236,8 +236,8 @@ To serialize an object, use the method to obtain a object from a value in the dictionary that is passed to the converter. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.Script.Serialization#5](~/snippets/csharp/VS_Snippets_Atlas/System.Web.Script.Serialization/CS/App_Code/ListItemCollectionConverter.cs#5)] - [!code-vb[System.Web.Script.Serialization#5](~/snippets/visualbasic/VS_Snippets_Atlas/System.Web.Script.Serialization/VB/App_Code/ListItemCollectionConverter.vb#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/System.Web.Script.Serialization/CS/App_Code/ListItemCollectionConverter.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/System.Web.Script.Serialization/VB/App_Code/ListItemCollectionConverter.vb" id="Snippet5"::: ]]> @@ -378,13 +378,13 @@ To serialize an object, use the @@ -614,8 +614,8 @@ It requires a class named `Person`, which is shown in the following example. ## Examples The following example shows how to register a custom converter with a instance. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.Script.Serialization#1](~/snippets/csharp/VS_Snippets_Atlas/System.Web.Script.Serialization/CS/Default.aspx#1)] - [!code-vb[System.Web.Script.Serialization#1](~/snippets/visualbasic/VS_Snippets_Atlas/System.Web.Script.Serialization/VB/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/System.Web.Script.Serialization/CS/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/System.Web.Script.Serialization/VB/Default.aspx" id="Snippet1"::: ]]> @@ -674,13 +674,13 @@ It requires a class named `Person`, which is shown in the following example. ## Examples The following example provides a simple illustration of how to serialize and deserialize data objects. -[!code-csharp[System.Web.Script.JavaScriptSerializer](~/snippets/csharp/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/cs/default.aspx.cs#1)] -[!code-vb[System.Web.Script.JavaScriptSerializer](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/vb/default.aspx.vb#1)] +:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/cs/default.aspx.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/vb/default.aspx.vb" id="Snippet1"::: It requires a class named `Person`, which is shown in the following example. -[!code-csharp[System.Web.Script.JavaScriptSerializer](~/snippets/csharp/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/cs/default.aspx.cs#2)] -[!code-vb[System.Web.Script.JavaScriptSerializer](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/vb/default.aspx.vb#2)] +:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/cs/default.aspx.cs" id="Snippet2"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.script.serialization.javascriptserializer/vb/default.aspx.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Security/ActiveDirectoryMembershipUser.xml b/xml/System.Web.Security/ActiveDirectoryMembershipUser.xml index ae121be9883..da985a3d66c 100644 --- a/xml/System.Web.Security/ActiveDirectoryMembershipUser.xml +++ b/xml/System.Web.Security/ActiveDirectoryMembershipUser.xml @@ -292,8 +292,8 @@ ## Examples The following code example demonstrates how to determine whether the underlying type of a membership user is , and to avoid throwing a for accessing the property. For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Security.ActiveDirectoryMembershipUser#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx#2)] - [!code-vb[System.Web.Security.ActiveDirectoryMembershipUser#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx" id="Snippet2"::: ]]> @@ -330,8 +330,8 @@ ## Examples The following code example demonstrates how to determine whether the underlying type of a membership user is , and to avoid throwing a for accessing the property. For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Security.ActiveDirectoryMembershipUser#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx#2)] - [!code-vb[System.Web.Security.ActiveDirectoryMembershipUser#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx" id="Snippet2"::: ]]> @@ -368,8 +368,8 @@ ## Examples The following code example displays the property in Security Descriptor Definition Language (SDDL) format by converting it to a object. For the full code required to run the example, see the Example section of the class overview topic. - [!code-csharp[System.Web.Security.ActiveDirectoryMembershipUser#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx#3)] - [!code-vb[System.Web.Security.ActiveDirectoryMembershipUser#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/CS/admuClassExamplecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.ActiveDirectoryMembershipUser/VB/admuClassExamplevb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.Security/AnonymousIdentificationEventArgs.xml b/xml/System.Web.Security/AnonymousIdentificationEventArgs.xml index 28ea7ee997d..83832e9a325 100644 --- a/xml/System.Web.Security/AnonymousIdentificationEventArgs.xml +++ b/xml/System.Web.Security/AnonymousIdentificationEventArgs.xml @@ -33,8 +33,8 @@ ## Examples The following code example uses the **AnonymousIdentification_Creating** event to set the anonymous identifier to a custom value. - [!code-csharp[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -117,8 +117,8 @@ ## Examples The following code example uses the **AnonymousIdentification_Creating** event to set the anonymous identifier to a custom value. - [!code-csharp[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/AnonymousIdentificationEventHandler.xml b/xml/System.Web.Security/AnonymousIdentificationEventHandler.xml index 07b349dc946..a3242b10f6b 100644 --- a/xml/System.Web.Security/AnonymousIdentificationEventHandler.xml +++ b/xml/System.Web.Security/AnonymousIdentificationEventHandler.xml @@ -39,8 +39,8 @@ ## Examples The following code example uses the **AnonymousIdentification_Creating** event to set the anonymous identifier to a custom value. - [!code-csharp[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/AnonymousIdentificationModule.xml b/xml/System.Web.Security/AnonymousIdentificationModule.xml index 2511f05a6d7..aff7fe5ba8c 100644 --- a/xml/System.Web.Security/AnonymousIdentificationModule.xml +++ b/xml/System.Web.Security/AnonymousIdentificationModule.xml @@ -181,8 +181,8 @@ ## Examples The following code example uses the **AnonymousIdentification_Creating** event to set the anonymous identifier to a custom value. - [!code-csharp[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.AnonymousIdentificationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.AnonymousIdentificationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/DefaultAuthenticationEventArgs.xml b/xml/System.Web.Security/DefaultAuthenticationEventArgs.xml index 749a25468d7..72d9d32b247 100644 --- a/xml/System.Web.Security/DefaultAuthenticationEventArgs.xml +++ b/xml/System.Web.Security/DefaultAuthenticationEventArgs.xml @@ -74,8 +74,8 @@ > [!NOTE] > The **DefaultAuthentication_OnAuthenticate** event is raised before the event. As a result, if you set the property of the current to a custom identity, it can affect the behavior of your application. For example, if you are using the class and you are ensuring that only authenticated users have access to your site, by using the `authorization` section and specifying ``, you will cause the `deny` element in this example to be ignored, as the user will have a name, which is "default". Instead you would specify `` to ensure that only authenticated users can access your site. - [!code-csharp[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/DefaultAuthenticationEventHandler.xml b/xml/System.Web.Security/DefaultAuthenticationEventHandler.xml index 9263400160d..a752a9ee71a 100644 --- a/xml/System.Web.Security/DefaultAuthenticationEventHandler.xml +++ b/xml/System.Web.Security/DefaultAuthenticationEventHandler.xml @@ -43,8 +43,8 @@ > [!NOTE] > The **DefaultAuthentication_OnAuthenticate** event is raised before the event. As a result, if you set the property of the current to a custom identity, it can affect the behavior of your application. For example, if you are using the class and you are ensuring that only authenticated users have access to your site, by using the `authorization` section and specifying ``, this sample will cause the `deny` element to be ignored, as the user will have a name, which is "default". Instead you would specify `` to ensure that only authenticated users can access your site. - [!code-csharp[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/DefaultAuthenticationModule.xml b/xml/System.Web.Security/DefaultAuthenticationModule.xml index 49aea4dbaf6..94b133bde9b 100644 --- a/xml/System.Web.Security/DefaultAuthenticationModule.xml +++ b/xml/System.Web.Security/DefaultAuthenticationModule.xml @@ -39,8 +39,8 @@ > [!NOTE] > The **DefaultAuthentication_OnAuthenticate** event is raised before the event. As a result, if you set the property of the current instance to a custom identity, it can affect the behavior of your application. For example, if you are using the class and you specify `` in the [authorization](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/8d82143t(v%3dvs.100)) configuration section to ensure that only authenticated users have access to your site, this sample will cause the [deny](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/8aeskccd(v%3dvs.100)) element to be ignored, as the user will have a name, which is "default." Instead, you would specify `` to ensure that only authenticated users can access your site. - [!code-csharp[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -124,8 +124,8 @@ > [!NOTE] > The **DefaultAuthentication_OnAuthenticate** event is raised before the event. As a result, if you set the property of the current instance to a custom identity, it can affect the behavior of your application. For example, if you are using the class and you specify `` in the [authorization](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/8d82143t(v%3dvs.100)) configuration section to ensure that only authenticated users have access to your site, this sample will cause the [deny](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/8aeskccd(v%3dvs.100)) element to be ignored, as the user will have a name, which is "default." Instead, you would specify `` to ensure that only authenticated users can access your site. - [!code-csharp[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.DefaultAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.DefaultAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/FormsAuthenticationEventArgs.xml b/xml/System.Web.Security/FormsAuthenticationEventArgs.xml index 7ac58ff92d7..0d26deb947f 100644 --- a/xml/System.Web.Security/FormsAuthenticationEventArgs.xml +++ b/xml/System.Web.Security/FormsAuthenticationEventArgs.xml @@ -36,8 +36,8 @@ ## Examples The following code example uses the **FormsAuthentication_OnAuthenticate** event to set the property of the current to a object with a custom . - [!code-csharp[System.Web.Security.FormsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.FormsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -161,8 +161,8 @@ ## Examples The following example uses the **FormsAuthentication_OnAuthenticate** event to set the property of the current to a object with a custom . - [!code-csharp[System.Web.Security.FormsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.FormsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/FormsAuthenticationEventHandler.xml b/xml/System.Web.Security/FormsAuthenticationEventHandler.xml index 4458e2eeb28..505f2990144 100644 --- a/xml/System.Web.Security/FormsAuthenticationEventHandler.xml +++ b/xml/System.Web.Security/FormsAuthenticationEventHandler.xml @@ -42,8 +42,8 @@ ## Examples The following code example uses the **FormsAuthentication_OnAuthenticate** event to set the property of the current to a object with a custom . - [!code-csharp[System.Web.Security.FormsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.FormsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/FormsAuthenticationModule.xml b/xml/System.Web.Security/FormsAuthenticationModule.xml index 91c8e42d721..bfa107a0498 100644 --- a/xml/System.Web.Security/FormsAuthenticationModule.xml +++ b/xml/System.Web.Security/FormsAuthenticationModule.xml @@ -37,8 +37,8 @@ ## Examples The following example uses the **FormsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.FormsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.FormsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -116,8 +116,8 @@ ## Examples The following code example uses the **FormsAuthentication_OnAuthenticate** event to set the property of the current to a object that has a custom . - [!code-csharp[System.Web.Security.FormsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.FormsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.FormsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/Membership.xml b/xml/System.Web.Security/Membership.xml index 2b6b673accd..9db04c7960b 100644 --- a/xml/System.Web.Security/Membership.xml +++ b/xml/System.Web.Security/Membership.xml @@ -2081,8 +2081,8 @@ ## Examples The following code example shows a event that validates the format of the password for a user and cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Security/MembershipCreateUserException.xml b/xml/System.Web.Security/MembershipCreateUserException.xml index c66b0c46f36..a1c6aa15f43 100644 --- a/xml/System.Web.Security/MembershipCreateUserException.xml +++ b/xml/System.Web.Security/MembershipCreateUserException.xml @@ -99,8 +99,8 @@ ## Examples The following code example calls the method to create a new membership user. If the user creation fails, a is thrown. - [!code-csharp[System.Web.Security.MembershipCreateUserException#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser3cs.aspx#3)] - [!code-vb[System.Web.Security.MembershipCreateUserException#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser3vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser3cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser3vb.aspx" id="Snippet3"::: ]]> @@ -142,8 +142,8 @@ ## Examples The following code example calls the method to create a new membership user. If the user creation fails, a is thrown with a message based on the returned by the method. - [!code-csharp[System.Web.Security.MembershipCreateUserException#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser2cs.aspx#2)] - [!code-vb[System.Web.Security.MembershipCreateUserException#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser2vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser2cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser2vb.aspx" id="Snippet2"::: ]]> @@ -185,8 +185,8 @@ ## Examples The following code example calls the method to create a new membership user. If the user creation fails, a is thrown with the returned by the method. - [!code-csharp[System.Web.Security.MembershipCreateUserException#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser1cs.aspx#1)] - [!code-vb[System.Web.Security.MembershipCreateUserException#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser1vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser1cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser1vb.aspx" id="Snippet1"::: ]]> @@ -228,8 +228,8 @@ ## Examples The following code example shows an implementation of the class that calls the protected constructor of the base class with the supplied serialization information and context. - [!code-csharp[System.Web.Security.MembershipCreateUserException#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/mycreateuserexception.cs#5)] - [!code-vb[System.Web.Security.MembershipCreateUserException#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/mycreateuserexception.vb#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/mycreateuserexception.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/mycreateuserexception.vb" id="Snippet5"::: ]]> @@ -273,8 +273,8 @@ ## Examples The following code example calls the method to create a new membership user. If the user creation fails, a is thrown. If the exception is not a , the caught exception is supplied as the of the that is thrown. - [!code-csharp[System.Web.Security.MembershipCreateUserException#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser4cs.aspx#4)] - [!code-vb[System.Web.Security.MembershipCreateUserException#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser4vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/CS/createuser4cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipCreateUserException/VB/createuser4vb.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.Security/MembershipProviderCollection.xml b/xml/System.Web.Security/MembershipProviderCollection.xml index faf9bc0972c..6df73bb4594 100644 --- a/xml/System.Web.Security/MembershipProviderCollection.xml +++ b/xml/System.Web.Security/MembershipProviderCollection.xml @@ -163,8 +163,8 @@ ## Examples The following code example uses the method to copy the contents of a to an array of objects. - [!code-csharp[System.Web.Security.MembershipProviderCollection#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/CS/snippetscs.aspx#3)] - [!code-vb[System.Web.Security.MembershipProviderCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/VB/snippetsvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/CS/snippetscs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/VB/snippetsvb.aspx" id="Snippet3"::: ]]> @@ -219,8 +219,8 @@ ## Examples The following code example accesses a configured for an application from the property of the class by name. - [!code-csharp[System.Web.Security.MembershipProviderCollection#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/CS/snippetscs.aspx#2)] - [!code-vb[System.Web.Security.MembershipProviderCollection#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/VB/snippetsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/CS/snippetscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipProviderCollection/VB/snippetsvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Security/MembershipUserCollection.xml b/xml/System.Web.Security/MembershipUserCollection.xml index 95a85ca682c..14102d1ada7 100644 --- a/xml/System.Web.Security/MembershipUserCollection.xml +++ b/xml/System.Web.Security/MembershipUserCollection.xml @@ -158,8 +158,8 @@ ## Examples The following code example clears a before replacing it with the results of the method. - [!code-csharp[System.Web.Security.MembershipUserCollection#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx#4)] - [!code-vb[System.Web.Security.MembershipUserCollection#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx" id="Snippet4"::: ]]> @@ -273,8 +273,8 @@ ## Examples The following code example uses the returned from the method to iterate through a . - [!code-csharp[System.Web.Security.MembershipUserCollection#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx#7)] - [!code-vb[System.Web.Security.MembershipUserCollection#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx" id="Snippet7"::: ]]> @@ -425,8 +425,8 @@ ## Examples The following code example returns all of the users from the membership data store. The returned is marked as read-only based on a `Boolean` parameter specified by the caller. - [!code-csharp[System.Web.Security.MembershipUserCollection#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx#5)] - [!code-vb[System.Web.Security.MembershipUserCollection#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/CS/snippetscs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUserCollection/VB/snippetsvb.aspx" id="Snippet5"::: ]]> diff --git a/xml/System.Web.Security/MembershipValidatePasswordEventHandler.xml b/xml/System.Web.Security/MembershipValidatePasswordEventHandler.xml index 70f68882161..343f402009d 100644 --- a/xml/System.Web.Security/MembershipValidatePasswordEventHandler.xml +++ b/xml/System.Web.Security/MembershipValidatePasswordEventHandler.xml @@ -53,8 +53,8 @@ ## Examples The following code example shows a event that validates the format of the password for the user, and then cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Security/RoleManagerEventArgs.xml b/xml/System.Web.Security/RoleManagerEventArgs.xml index 3ece27b39b4..5c040843042 100644 --- a/xml/System.Web.Security/RoleManagerEventArgs.xml +++ b/xml/System.Web.Security/RoleManagerEventArgs.xml @@ -99,8 +99,8 @@ ## Examples The following example shows the event included in the Global.asax file for an ASP.NET application. The event adds a trace notification for an application where trace is enabled in the Web.config file. - [!code-csharp[System.Web.Security.RoleManagerModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.RoleManagerModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/RoleManagerEventHandler.xml b/xml/System.Web.Security/RoleManagerEventHandler.xml index 134c6a8b03f..3b04e732119 100644 --- a/xml/System.Web.Security/RoleManagerEventHandler.xml +++ b/xml/System.Web.Security/RoleManagerEventHandler.xml @@ -37,8 +37,8 @@ ## Examples The following example shows the event included in the Global.asax file for an ASP.NET application. The event adds a trace notification for an application where trace is enabled in the Web.config file. - [!code-csharp[System.Web.Security.RoleManagerModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.RoleManagerModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/RoleManagerModule.xml b/xml/System.Web.Security/RoleManagerModule.xml index affff528a2b..bb19adc8bea 100644 --- a/xml/System.Web.Security/RoleManagerModule.xml +++ b/xml/System.Web.Security/RoleManagerModule.xml @@ -135,8 +135,8 @@ ## Examples The following example shows the event included in the Global.asax file for an ASP.NET application. The event adds a trace notification for an application where trace is enabled in the Web.config file. - [!code-csharp[System.Web.Security.RoleManagerModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.RoleManagerModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleManagerModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/RolePrincipal.xml b/xml/System.Web.Security/RolePrincipal.xml index 193820d6138..b0a52920e7a 100644 --- a/xml/System.Web.Security/RolePrincipal.xml +++ b/xml/System.Web.Security/RolePrincipal.xml @@ -94,8 +94,8 @@ ## Examples The following code example creates a new object. If is `true`, the example creates the with cookie information from the cookie identified by the property. - [!code-csharp[System.Web.Security.RolePrincipal#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx#2)] - [!code-vb[System.Web.Security.RolePrincipal#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx" id="Snippet2"::: ]]> @@ -164,8 +164,8 @@ ## Examples The following code example creates a new object. If is `true`, the example creates the with cookie information from the cookie identified by the property. - [!code-csharp[System.Web.Security.RolePrincipal#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx#2)] - [!code-vb[System.Web.Security.RolePrincipal#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx" id="Snippet2"::: ]]> @@ -830,8 +830,8 @@ ## Examples The following code example writes the results of the method to the roles cookie. - [!code-csharp[System.Web.Security.RolePrincipal#6](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx#6)] - [!code-vb[System.Web.Security.RolePrincipal#6](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/CS/snippetscs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RolePrincipal/VB/snippetsvb.aspx" id="Snippet6"::: ]]> diff --git a/xml/System.Web.Security/RoleProviderCollection.xml b/xml/System.Web.Security/RoleProviderCollection.xml index 07c31f89e16..91e118a3694 100644 --- a/xml/System.Web.Security/RoleProviderCollection.xml +++ b/xml/System.Web.Security/RoleProviderCollection.xml @@ -139,8 +139,8 @@ ## Examples The following code example uses the method to copy the contents of a to an array of objects. - [!code-csharp[System.Web.Security.RoleProviderCollection#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/CS/snippetscs.aspx#3)] - [!code-vb[System.Web.Security.RoleProviderCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/VB/snippetsvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/CS/snippetscs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/VB/snippetsvb.aspx" id="Snippet3"::: ]]> @@ -181,8 +181,8 @@ ## Examples The following code example accesses a configured for an application from the property of the class by name. - [!code-csharp[System.Web.Security.RoleProviderCollection#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/CS/snippetscs.aspx#2)] - [!code-vb[System.Web.Security.RoleProviderCollection#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/VB/snippetsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/CS/snippetscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.RoleProviderCollection/VB/snippetsvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.Security/SqlMembershipProvider.xml b/xml/System.Web.Security/SqlMembershipProvider.xml index 2a88b0dfd4e..d57d5cd9da5 100644 --- a/xml/System.Web.Security/SqlMembershipProvider.xml +++ b/xml/System.Web.Security/SqlMembershipProvider.xml @@ -826,8 +826,8 @@ This class is used by the and diff --git a/xml/System.Web.Security/ValidatePasswordEventArgs.xml b/xml/System.Web.Security/ValidatePasswordEventArgs.xml index 08b0159c887..7d3fc2ee5f8 100644 --- a/xml/System.Web.Security/ValidatePasswordEventArgs.xml +++ b/xml/System.Web.Security/ValidatePasswordEventArgs.xml @@ -45,8 +45,8 @@ ## Examples The following code example shows a event that validates the format of the password for the user and cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> @@ -137,8 +137,8 @@ The constructor ## Examples The following code example shows a event that validates the format of the password for the user and cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> @@ -190,8 +190,8 @@ The constructor ## Examples The following code example shows a event that validates the format of the password for the user and cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> @@ -276,8 +276,8 @@ The constructor ## Examples The following code example shows a event that validates the format of the password for the user and cancels the action if the password does not match the required format. - [!code-csharp[System.Web.Security.Membership#11](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx#11)] - [!code-vb[System.Web.Security.Membership#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx#11)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.Membership/CS/CreateUser3cs.aspx" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.Membership/VB/CreateUser3vb.aspx" id="Snippet11"::: ]]> diff --git a/xml/System.Web.Security/WindowsAuthenticationEventArgs.xml b/xml/System.Web.Security/WindowsAuthenticationEventArgs.xml index daf764296b6..d5ce0e6e867 100644 --- a/xml/System.Web.Security/WindowsAuthenticationEventArgs.xml +++ b/xml/System.Web.Security/WindowsAuthenticationEventArgs.xml @@ -34,8 +34,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -157,8 +157,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -208,8 +208,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/WindowsAuthenticationEventHandler.xml b/xml/System.Web.Security/WindowsAuthenticationEventHandler.xml index 5fe4e656ba7..8cb57f82b73 100644 --- a/xml/System.Web.Security/WindowsAuthenticationEventHandler.xml +++ b/xml/System.Web.Security/WindowsAuthenticationEventHandler.xml @@ -42,8 +42,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Security/WindowsAuthenticationModule.xml b/xml/System.Web.Security/WindowsAuthenticationModule.xml index af184858f01..590530da1b6 100644 --- a/xml/System.Web.Security/WindowsAuthenticationModule.xml +++ b/xml/System.Web.Security/WindowsAuthenticationModule.xml @@ -37,8 +37,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> @@ -119,8 +119,8 @@ ## Examples The following code example uses the **WindowsAuthentication_OnAuthenticate** event to set the property of the current to a custom object. - [!code-csharp[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax#1)] - [!code-vb[System.Web.Security.WindowsAuthenticationModule#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.WindowsAuthenticationModule/VB/global.asax" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Services.Discovery/DiscoveryClientProtocol.xml b/xml/System.Web.Services.Discovery/DiscoveryClientProtocol.xml index 9c336b51f04..3cbabbd6f3c 100644 --- a/xml/System.Web.Services.Discovery/DiscoveryClientProtocol.xml +++ b/xml/System.Web.Services.Discovery/DiscoveryClientProtocol.xml @@ -94,9 +94,9 @@ ## Examples - [!code-cpp[DiscoveryClientProtocol_AdditionalInformation#1](~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_AdditionalInformation/CPP/discoveryclientprotocol_additionalinformation.cpp#1)] - [!code-csharp[DiscoveryClientProtocol_AdditionalInformation#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/AdditionalInformation/discoveryclientprotocol_additionalinformation.cs#1)] - [!code-vb[DiscoveryClientProtocol_AdditionalInformation#1](~/snippets/visualbasic/System.Web.Services.Discovery/DiscoveryClientProtocol/AdditionalInformation/discoveryclientprotocol_additionalinformation.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_AdditionalInformation/CPP/discoveryclientprotocol_additionalinformation.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/AdditionalInformation/discoveryclientprotocol_additionalinformation.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Discovery/DiscoveryClientProtocol/AdditionalInformation/discoveryclientprotocol_additionalinformation.vb" id="Snippet1"::: ]]> @@ -139,8 +139,8 @@ ## Examples The following code example is a Web Form that populates a with the details about the documents in the property together with the references found in each document during XML Web services discovery. The `PopulateGrid` method fills the with the results from a invocation followed by a call to . - [!code-csharp[DiscoveryClientProtocol.Discover#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/Discover/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.Discover#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.Discover/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/Discover/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.Discover/VB/discovb.aspx" id="Snippet1"::: ]]> @@ -185,8 +185,8 @@ ## Examples The following code example is a Web Form that populates a with the details about the documents in the property together with the references found in each document during an XML Web services discovery. The `PopulateGrid` method fills the with the results from a invocation followed by a call to . - [!code-csharp[DiscoveryClientProtocol.DiscoverAny#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/DiscoverAny/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.DiscoverAny#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.DiscoverAny/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/DiscoverAny/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.DiscoverAny/VB/discovb.aspx" id="Snippet1"::: ]]> @@ -278,9 +278,9 @@ @@ -317,9 +317,9 @@ @@ -355,9 +355,9 @@ ## Examples - [!code-cpp[DiscoveryClientProtocol_Errors#1](~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_Errors/CPP/discoveryclientprotocol_errors.cpp#1)] - [!code-csharp[DiscoveryClientProtocol_Errors#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/Errors/discoveryclientprotocol_errors.cs#1)] - [!code-vb[DiscoveryClientProtocol_Errors#1](~/snippets/visualbasic/System.Web.Services.Discovery/DiscoveryClientProtocol/Errors/discoveryclientprotocol_errors.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_Errors/CPP/discoveryclientprotocol_errors.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/Errors/discoveryclientprotocol_errors.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Discovery/DiscoveryClientProtocol/Errors/discoveryclientprotocol_errors.vb" id="Snippet1"::: ]]> @@ -433,8 +433,8 @@ ## Examples The following code example is a Web Form that populates a with the details about the documents and references found in an existing discovery map document using the method. - [!code-csharp[DiscoveryClientProtocol.ReadAll#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ReadAll/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.ReadAll#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ReadAll/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ReadAll/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ReadAll/VB/discovb.aspx" id="Snippet1"::: ]]> @@ -514,8 +514,8 @@ ## Examples The following code example is a Web Form that populates a with the details about the documents in the property together with the references found in each document during an XML Web services discovery. The `PopulateGrid` method fills the with the results from a invocation followed by a call to . - [!code-csharp[DiscoveryClientProtocol.ResolveAll#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ResolveAll/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.ResolveAll#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ResolveAll/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ResolveAll/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ResolveAll/VB/discovb.aspx" id="Snippet1"::: ]]> @@ -554,8 +554,8 @@ ## Examples The following code example is a Web Form that populates a with the details about the documents in the property together with the references found in each document during an XML Web services discovery. The `PopulateGrid` method fills the with the results from a invocation followed by a call to . - [!code-csharp[DiscoveryClientProtocol.ResolveOneLevel#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ResolveOneLevel/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.ResolveOneLevel#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ResolveOneLevel/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/ResolveOneLevel/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.ResolveOneLevel/VB/discovb.aspx" id="Snippet1"::: ]]> @@ -600,8 +600,8 @@ ## Examples The following code example is a Web Form that writes the results of a Web Services discovery to disk by invoking the method after calls to and . - [!code-csharp[DiscoveryClientProtocol.WriteAll#1](~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/WriteAll/discocs.aspx#1)] - [!code-vb[DiscoveryClientProtocol.WriteAll#1](~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.WriteAll/VB/discovb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Discovery/DiscoveryClientProtocol/WriteAll/discocs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DiscoveryClientProtocol.WriteAll/VB/discovb.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Services.Protocols/HttpSimpleClientProtocol.xml b/xml/System.Web.Services.Protocols/HttpSimpleClientProtocol.xml index efbbd87d388..9166223b4a4 100644 --- a/xml/System.Web.Services.Protocols/HttpSimpleClientProtocol.xml +++ b/xml/System.Web.Services.Protocols/HttpSimpleClientProtocol.xml @@ -38,15 +38,15 @@ ## Examples The following code example is a proxy class generated by Wsdl.exe for the `Math` XML Web service below. The proxy class derives from , which derives from the abstract class. - [!code-cpp[Classic HttpGetClientProtocol Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic HttpGetClientProtocol Example/CPP/source.cpp#1)] - [!code-csharp[Classic HttpGetClientProtocol Example#1](~/snippets/csharp/System.Web.Services.Protocols/HttpGetClientProtocol/Overview/source.cs#1)] - [!code-vb[Classic HttpGetClientProtocol Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/HttpGetClientProtocol/Overview/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpGetClientProtocol Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpGetClientProtocol/Overview/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpGetClientProtocol/Overview/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was created. - [!code-cpp[Classic HttpSimpleClientProtocol Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol Example/CPP/source.cpp#1)] - [!code-csharp[Classic HttpSimpleClientProtocol Example#1](~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Overview/source.cs#1)] - [!code-vb[Classic HttpSimpleClientProtocol Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Overview/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Overview/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Overview/source.vb" id="Snippet1"::: ]]> @@ -123,9 +123,9 @@ The following code example is a proxy class generated by the Web Services Description Language tool (Wsdl.exe) for the `Math` XML Web service below. Within the `BeginAdd` method of the proxy class, the method starts an asynchronous invocation of the `Add` XML Web service method. - [!code-cpp[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol.EndInvoke Example/CPP/source.cpp#2)] - [!code-csharp[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.cs#2)] - [!code-vb[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol.EndInvoke Example/CPP/source.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.vb" id="Snippet2"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was created. @@ -173,9 +173,9 @@ The following code example is a proxy class generated by the Web Services Description Language tool (Wsdl.exe) for the `Math` XML Web service below. Within the `EndAdd` method of the proxy class, the method starts an asynchronous invocation of the `Add` XML Web service method. - [!code-cpp[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol.EndInvoke Example/CPP/source.cpp#2)] - [!code-csharp[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.cs#2)] - [!code-vb[Classic HttpSimpleClientProtocol.EndInvoke Example#2](~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.vb#2)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpSimpleClientProtocol.EndInvoke Example/CPP/source.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/BeginInvoke/source.vb" id="Snippet2"::: The following code example is the `Math` XML Web service, from which the above proxy class was created. @@ -227,14 +227,14 @@ ## Examples The following code example is an ASP.NET Web Form, which calls an XML Web service named `Math`. Within the `EnterBtn_Click` function, the Web Form synchronously invokes the `Add` XML Web service method. - [!code-csharp[HttpSimpleClientProtocol.Invoke Example#2](~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/sourcecs.asmx#2)] - [!code-vb[HttpSimpleClientProtocol.Invoke Example#2](~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/sourcevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/sourcecs.asmx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/sourcevb.aspx" id="Snippet2"::: The following code example is a proxy class generated by the Web Services Description Language tool (Wsdl.exe) for the `Math` XML Web service below. Within the `Add` method of the proxy class, the method synchronously invokes the `Add` Web Service method. - [!code-cpp[HttpSimpleClientProtocol.Invoke Example#1](~/snippets/cpp/VS_Snippets_Remoting/HttpSimpleClientProtocol.Invoke Example/CPP/source.cpp#1)] - [!code-csharp[HttpSimpleClientProtocol.Invoke Example#1](~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/source.cs#1)] - [!code-vb[HttpSimpleClientProtocol.Invoke Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpSimpleClientProtocol.Invoke Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpSimpleClientProtocol/Invoke/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the above proxy class was created. diff --git a/xml/System.Web.Services.Protocols/HttpWebClientProtocol.xml b/xml/System.Web.Services.Protocols/HttpWebClientProtocol.xml index a88693222bc..b9e7242b752 100644 --- a/xml/System.Web.Services.Protocols/HttpWebClientProtocol.xml +++ b/xml/System.Web.Services.Protocols/HttpWebClientProtocol.xml @@ -180,8 +180,8 @@ ## Examples The following code example demonstrates how to load in a client certificate from a file and then add it to the property for calling an XML Web service method that uses client certificates for authentication. - [!code-csharp[HttpWebClientProtocol.ClientCertificates#1](~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/ClientCertificates/certcs.aspx#1)] - [!code-vb[HttpWebClientProtocol.ClientCertificates#1](~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebClientProtocol.ClientCertificates/VB/certvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/ClientCertificates/certcs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebClientProtocol.ClientCertificates/VB/certvb.aspx" id="Snippet1"::: ]]> @@ -468,9 +468,9 @@ ## Examples The following example sets the following proxy settings prior to invoking the `Math` XML Web service: the proxy server to `http://proxyserver`, the proxy port to 80 and the bypass to the proxy server for local addresses. - [!code-cpp[Classic HttpWebClientProtocol.Proxy Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebClientProtocol.Proxy Example/CPP/source.cpp#1)] - [!code-csharp[Classic HttpWebClientProtocol.Proxy Example#1](~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/Proxy/source.cs#1)] - [!code-vb[Classic HttpWebClientProtocol.Proxy Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/HttpWebClientProtocol/Proxy/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebClientProtocol.Proxy Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/Proxy/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpWebClientProtocol/Proxy/source.vb" id="Snippet1"::: ]]> @@ -560,9 +560,9 @@ ## Examples - [!code-cpp[HttpWebClientProtocol_UserAgent#1](~/snippets/cpp/VS_Snippets_Remoting/HttpWebClientProtocol_UserAgent/CPP/httpwebclientprotocol_useragent.cpp#1)] - [!code-csharp[HttpWebClientProtocol_UserAgent#1](~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/UserAgent/httpwebclientprotocol_useragent.cs#1)] - [!code-vb[HttpWebClientProtocol_UserAgent#1](~/snippets/visualbasic/System.Web.Services.Protocols/HttpWebClientProtocol/UserAgent/httpwebclientprotocol_useragent.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebClientProtocol_UserAgent/CPP/httpwebclientprotocol_useragent.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/HttpWebClientProtocol/UserAgent/httpwebclientprotocol_useragent.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/HttpWebClientProtocol/UserAgent/httpwebclientprotocol_useragent.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web.Services.Protocols/SoapHttpClientProtocol.xml b/xml/System.Web.Services.Protocols/SoapHttpClientProtocol.xml index 240634bc860..2c25855414f 100644 --- a/xml/System.Web.Services.Protocols/SoapHttpClientProtocol.xml +++ b/xml/System.Web.Services.Protocols/SoapHttpClientProtocol.xml @@ -37,9 +37,9 @@ ## Examples The following code example is a proxy class generated by Wsdl.exe for the `Math` XML Web service. The proxy class derives from , which derives from the abstract class. - [!code-cpp[Classic SoapHttpClientProtocol Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol Example/CPP/source.cpp#1)] - [!code-csharp[Classic SoapHttpClientProtocol Example#1](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/BeginInvoke/source.cs#1)] - [!code-vb[Classic SoapHttpClientProtocol Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/BeginInvoke/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/BeginInvoke/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/BeginInvoke/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was generated. @@ -127,9 +127,9 @@ ## Examples The following code example is a proxy class generated by the Web Services Description Language tool (Wsdl.exe) for the `Math` XML Web service. Within the `BeginAdd` method of the proxy class, the method is starting an asynchronous invocation to the `Add` XML Web service method. - [!code-cpp[Classic SoapHttpClientProtocol.BeginInvoke Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.BeginInvoke Example/CPP/source.cpp#1)] - [!code-csharp[Classic SoapHttpClientProtocol.BeginInvoke Example#1](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/EndInvoke/source.cs#1)] - [!code-vb[Classic SoapHttpClientProtocol.BeginInvoke Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/EndInvoke/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.BeginInvoke Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/EndInvoke/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/EndInvoke/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was created. @@ -181,17 +181,17 @@ ## Examples The following code example is a proxy class generated using the Wsdl.exe utility for the `Math` XML Web service. A is applied to the `Math` proxy class setting the binding name to `MathSoap` and its namespace to `http://tempuri.org/`. - [!code-cpp[SoapHttpClientProtocol.Discover Example#1](~/snippets/cpp/VS_Snippets_Remoting/SoapHttpClientProtocol.Discover Example/CPP/source.cpp#1)] - [!code-csharp[SoapHttpClientProtocol.Discover Example#1](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/source.cs#1)] - [!code-vb[SoapHttpClientProtocol.Discover Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SoapHttpClientProtocol.Discover Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/source.vb" id="Snippet1"::: The following code example is a Web Service client using the preceding proxy class. Within the `EnterBtn_Click` event of the Web Form, the XML Web service client calls the method attempting to dynamically bind to the URL supplied by the user. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[SoapHttpClientProtocol.Discover Example#2](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/sourcecs.aspx#2)] - [!code-vb[SoapHttpClientProtocol.Discover Example#2](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/sourcevb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/sourcecs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Discover/sourcevb.aspx" id="Snippet2"::: ]]> @@ -244,9 +244,9 @@ The proxy class does not have a binding defined. ## Examples The following code example is a proxy class generated by Wsdl.exe for the `Math` XML Web service. Within the `EndAdd` method of the proxy class, the method completes the asynchronous invocation to the `Add` XML Web service method. - [!code-cpp[Classic SoapHttpClientProtocol.EndInvoke Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.EndInvoke Example/CPP/source.cpp#1)] - [!code-csharp[Classic SoapHttpClientProtocol.EndInvoke Example#1](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Invoke/source.cs#1)] - [!code-vb[Classic SoapHttpClientProtocol.EndInvoke Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Invoke/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.EndInvoke Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Invoke/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Invoke/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was created. @@ -402,9 +402,9 @@ The proxy class does not have a binding defined. ## Examples The following code example is a proxy class generated by Wsdl.exe for the `Math` XML Web service. Within the `Add` method of the proxy class, the method is calling the `Add` XML Web service method. - [!code-cpp[Classic SoapHttpClientProtocol.Invoke Example#1](~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.Invoke Example/CPP/source.cpp#1)] - [!code-csharp[Classic SoapHttpClientProtocol.Invoke Example#1](~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Overview/source.cs#1)] - [!code-vb[Classic SoapHttpClientProtocol.Invoke Example#1](~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Overview/source.vb#1)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic SoapHttpClientProtocol.Invoke Example/CPP/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Web.Services.Protocols/SoapHttpClientProtocol/Overview/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Web.Services.Protocols/SoapHttpClientProtocol/Overview/source.vb" id="Snippet1"::: The following code example is the `Math` XML Web service, from which the preceding proxy class was created. diff --git a/xml/System.Web.SessionState/HttpSessionState.xml b/xml/System.Web.SessionState/HttpSessionState.xml index 01af2ecec9a..52d259defa6 100644 --- a/xml/System.Web.SessionState/HttpSessionState.xml +++ b/xml/System.Web.SessionState/HttpSessionState.xml @@ -232,8 +232,8 @@ ## Examples The following code example lists the item names and values in the property. - [!code-csharp[HttpSessionState#9](~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx#9)] - [!code-vb[HttpSessionState#9](~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx" id="Snippet9"::: ]]> @@ -899,8 +899,8 @@ http://www.example.com/(S(4danlfat035muve4g0mvgfrr))/orderform.aspx ## Examples The following code example lists the `id` and object type of the objects in the collection. - [!code-csharp[HttpSessionState#10](~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx#10)] - [!code-vb[HttpSessionState#10](~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx#10)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx" id="Snippet10"::: ]]> diff --git a/xml/System.Web.SessionState/IReadOnlySessionState.xml b/xml/System.Web.SessionState/IReadOnlySessionState.xml index 05aa8c5c90a..38a6a3c7396 100644 --- a/xml/System.Web.SessionState/IReadOnlySessionState.xml +++ b/xml/System.Web.SessionState/IReadOnlySessionState.xml @@ -29,8 +29,8 @@ ## Examples The following code example examines the current HTTP property to determine whether it requires only read access to session-state values. - [!code-csharp[HttpSessionState#31](~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx#31)] - [!code-vb[HttpSessionState#31](~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx#31)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx" id="Snippet31"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx" id="Snippet31"::: ]]> diff --git a/xml/System.Web.SessionState/IRequiresSessionState.xml b/xml/System.Web.SessionState/IRequiresSessionState.xml index 2f65ed3a902..bde01f798ea 100644 --- a/xml/System.Web.SessionState/IRequiresSessionState.xml +++ b/xml/System.Web.SessionState/IRequiresSessionState.xml @@ -25,8 +25,8 @@ ## Examples The following code example examines the current HTTP property to determine whether it requires read and write access to session-state values. - [!code-csharp[HttpSessionState#32](~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx#32)] - [!code-vb[HttpSessionState#32](~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx#32)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpSessionState/CS/snippetscs.aspx" id="Snippet32"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpSessionState/VB/snippetsvb.aspx" id="Snippet32"::: ]]> diff --git a/xml/System.Web.SessionState/SessionStateItemCollection.xml b/xml/System.Web.SessionState/SessionStateItemCollection.xml index e802e4b687c..90feb64cccc 100644 --- a/xml/System.Web.SessionState/SessionStateItemCollection.xml +++ b/xml/System.Web.SessionState/SessionStateItemCollection.xml @@ -37,8 +37,8 @@ ## Examples The following code example creates a new object and sets and gets values in the collection by name. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#1)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet1"::: ]]> @@ -74,8 +74,8 @@ ## Examples The following code example creates a new object and sets and gets values in the collection by name. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#1)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet1"::: ]]> @@ -147,8 +147,8 @@ ## Examples The following code example creates a collection from a file that was created using the method. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/serializecs.aspx#4)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/serializevb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/serializecs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/serializevb.aspx" id="Snippet4"::: ]]> @@ -235,8 +235,8 @@ ## Examples The following code example gets the variable names in a collection using the method. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#1)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet1"::: ]]> @@ -288,8 +288,8 @@ The following code example sets and gets values in a collection by numerical index. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#2)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet2"::: ]]> @@ -331,8 +331,8 @@ The following code example sets and gets values in a collection by name. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#1)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet1"::: ]]> @@ -372,8 +372,8 @@ ## Examples The following code example gets the variable names in a collection using the variable names returned by the property. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx#1)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/keyscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/keysvb.aspx" id="Snippet1"::: ]]> @@ -493,8 +493,8 @@ ## Examples The following code example creates and populates a collection and writes the contents to a file using the method. - [!code-csharp[System.Web.SessionState.SessionStateItemCollection#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/serializecs.aspx#3)] - [!code-vb[System.Web.SessionState.SessionStateItemCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/serializevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/CS/serializecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SessionState.SessionStateItemCollection/VB/serializevb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.HtmlControls/HtmlHead.xml b/xml/System.Web.UI.HtmlControls/HtmlHead.xml index 72fb307a3e2..910bb791ebc 100644 --- a/xml/System.Web.UI.HtmlControls/HtmlHead.xml +++ b/xml/System.Web.UI.HtmlControls/HtmlHead.xml @@ -318,8 +318,8 @@ ## Examples The following example shows how to programmatically add an embedded style rule for the HTML `body` element. This example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.HtmlControls.HtmlHeadClass#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlHeadClass/CS/htmlheadclasscs.aspx#2)] - [!code-vb[System.Web.UI.HtmlControls.HtmlHeadClass#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlHeadClass/VB/htmlheadclassvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlHeadClass/CS/htmlheadclasscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlHeadClass/VB/htmlheadclassvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.HtmlControls/HtmlLink.xml b/xml/System.Web.UI.HtmlControls/HtmlLink.xml index 2b03f41e944..8da3a004043 100644 --- a/xml/System.Web.UI.HtmlControls/HtmlLink.xml +++ b/xml/System.Web.UI.HtmlControls/HtmlLink.xml @@ -94,10 +94,10 @@ h1 { ## Examples The following code example demonstrates how to programmatically declare an control and define its properties. For a complete, working code example, see the class overview topic. - [!code-csharp[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllink.cs#2)] - [!code-csharp[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllinkcs.aspx#2)] - [!code-vb[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllinkvb.aspx#2)] - [!code-vb[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllink.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllink.cs" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllinkcs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllinkvb.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllink.vb" id="Snippet2"::: ]]> @@ -147,10 +147,10 @@ h1 { ## Examples The following code example demonstrates setting the property to a cascading style sheet (CSS) that is saved in the same directory as the Web page. For a complete, working code example, see the class overview topic. - [!code-csharp[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllink.cs#2)] - [!code-csharp[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllinkcs.aspx#2)] - [!code-vb[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllinkvb.aspx#2)] - [!code-vb[System.Web.UI.HtmlControls.HtmlLink#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllink.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllink.cs" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/CS/htmllinkcs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllinkvb.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.HtmlControls.HtmlLink/VB/htmllink.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/BehaviorEditorPart.xml b/xml/System.Web.UI.WebControls.WebParts/BehaviorEditorPart.xml index a78676d2440..156a3dbbdef 100644 --- a/xml/System.Web.UI.WebControls.WebParts/BehaviorEditorPart.xml +++ b/xml/System.Web.UI.WebControls.WebParts/BehaviorEditorPart.xml @@ -444,8 +444,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_BehaviorEditorPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_BehaviorEditorPart_Overview/CS/behavioreditorpartcs.aspx#3)] - [!code-vb[WebParts_BehaviorEditorPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_BehaviorEditorPart_Overview/VB/behavioreditorpartvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_BehaviorEditorPart_Overview/CS/behavioreditorpartcs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_BehaviorEditorPart_Overview/VB/behavioreditorpartvb.aspx" id="Snippet3"::: When you load the page in a browser, you can select **Edit Mode** in the **Display Mode** drop-down list control to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of the **Author List WebPart** control, and click **Edit** to begin editing. When the editing UI is visible, you can see the control, and a button and text box positioned above it. Note that the title of the control is the value assigned to it in the declarative markup of the Web page. If you enter some text in the text box next to the **Update EditorPart Title** button, and then click the button, the title for the control is updated. diff --git a/xml/System.Web.UI.WebControls.WebParts/CatalogPartCollection.xml b/xml/System.Web.UI.WebControls.WebParts/CatalogPartCollection.xml index d847957cb5d..8d903ef86ae 100644 --- a/xml/System.Web.UI.WebControls.WebParts/CatalogPartCollection.xml +++ b/xml/System.Web.UI.WebControls.WebParts/CatalogPartCollection.xml @@ -43,8 +43,8 @@ The second part of the code example is the `TextDisplayWebPart` control. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. For a walkthrough that demonstrates both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). Note that the control has a property named `ContentText`; this property holds the value that the user enters in the text box. - [!code-csharp[WebParts_CatalogPartCollection_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/textdisplaywebpart.cs#3)] - [!code-vb[WebParts_CatalogPartCollection_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/textdisplaywebpart.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/textdisplaywebpart.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/textdisplaywebpart.vb" id="Snippet3"::: The third part of the code example is the Web page. Notice that the `` element for the page contains declarations for two controls. These controls become part of a custom object that is created when the `Button1_Click` method executes. The control contains Web server controls that have been previously closed by a user at run time. Controls in the control can be added back to a page. The control contains a declaration of the custom `TextDisplayWebPart` control. When the page is in catalog mode, a user can add the `TextDisplayWebPart` control to the page so that it can be used in normal browse mode. @@ -147,8 +147,8 @@ The code in the `Button1_Click` method creates an object, adds the two controls in the page to the object, and then creates a new object using the constructor. It also demonstrates how you can make batch changes to the underlying controls, even though the collection itself is read-only. The code loops through the collection, updating the property of each control. - [!code-csharp[WebParts_CatalogPartCollection_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx#2)] - [!code-vb[WebParts_CatalogPartCollection_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx" id="Snippet2"::: When you load the page in a browser, you can switch the page into catalog mode by selecting **Catalog** in the **Display Mode** drop-down list control. Clicking the **Display CatalogPart Properties** button accesses the object and displays certain properties of the contained controls. Also, if you position your mouse pointer over the title text within the border of the control, you can see the new description text that was added to the control when you clicked the button (the description appears in a ToolTip). If you click the **Page Catalog** link to display the control, you will find that it also has an updated description. @@ -218,8 +218,8 @@ The code in the `Button1_Click` method creates a new object named `myParts`. The method uses the method to determine whether the `PageCatalogPart1` control exists, and if so, retrieves the control and changes a property value. - [!code-csharp[WebParts_CatalogPartCollection_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx#2)] - [!code-vb[WebParts_CatalogPartCollection_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx" id="Snippet2"::: When you load the page in a browser, you can switch the page into catalog mode by selecting **Catalog** in the **Display Mode** drop-down list control. Add the custom control to the page by selecting the check box next to it and clicking **Add**. Click **Close** to return the page to browse mode. On the control you just added, if you click the verbs menu (the down arrow that appears in the title bar) and then click **Close**, the control is removed from the page and added to the control. Return the page to catalog mode, and click the **Page Catalog** link to view the contents of the control. Notice that the control you closed has been added to it. Clicking the **Display CatalogPart Properties** button accesses the object and displays certain properties of the contained controls. Select the check box next to the server control contained in the control, click **Add** to add it back to the page, and then click **Close** to return the page to browse mode. Click the verbs menu again on the control, and note that now the close verb is gone. It was removed by the code in the `Button1_Click` method, when it used the method to check for `PageCatalogPart1`, and then set its property to `false`. @@ -330,8 +330,8 @@ The code in the `Button1_Click` method creates a new object named `myParts`. The method uses the property to retrieve the position of the control, and then changes a property value on the control. - [!code-csharp[WebParts_CatalogPartCollection_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx#2)] - [!code-vb[WebParts_CatalogPartCollection_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx" id="Snippet2"::: After you load the page in a browser, you can switch the page into catalog mode by selecting **Catalog** in the **Display Mode** drop-down list control. Clicking the **Display CatalogPart Properties** button accesses the object and displays certain properties of the contained controls. Click the **Page Catalog** link to display the contents of the control. Note that it has only a title and no border, because its property value was changed to in the code that used the property to retrieve the control. @@ -386,8 +386,8 @@ The code in the `Button1_Click` method creates a new object named `myParts`. Note that the method uses the indexer to retrieve information from the first member of the collection. - [!code-csharp[WebParts_CatalogPartCollection_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx#2)] - [!code-vb[WebParts_CatalogPartCollection_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx" id="Snippet2"::: When you load the page in a browser, you can switch the page into catalog mode by selecting **Catalog** in the **Display Mode** drop-down list control. Clicking the **Display CatalogPart Properties** button accesses the object and displays certain properties of the contained controls. The count of available server controls within the control is obtained by using the indexer in the `Button1_Click` method. @@ -432,8 +432,8 @@ The code in the `Button1_Click` method creates a new object named `myParts`. The method uses the indexer to retrieve information about the control, which is the second member of the collection. - [!code-csharp[WebParts_CatalogPartCollection_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx#2)] - [!code-vb[WebParts_CatalogPartCollection_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/CS/catalogpartcollectioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartCollection_Overview/VB/catalogpartcollectionvb.aspx" id="Snippet2"::: When you load the page in a browser, you can switch the page into catalog mode by selecting **Catalog** in the **Display Mode** drop-down list control. Clicking the **Display CatalogPart Properties** button accesses the object and displays certain properties of the contained controls. The count of available server controls within the control is obtained by using the indexer in the `Button1_Click` method. diff --git a/xml/System.Web.UI.WebControls.WebParts/CatalogZoneBase.xml b/xml/System.Web.UI.WebControls.WebParts/CatalogZoneBase.xml index 8e8938ae0ef..356233e3e95 100644 --- a/xml/System.Web.UI.WebControls.WebParts/CatalogZoneBase.xml +++ b/xml/System.Web.UI.WebControls.WebParts/CatalogZoneBase.xml @@ -74,8 +74,8 @@ The third part of the code example is the custom control named `TextDisplayWebPart`. It is declared within the zone, and an end user can add it from the catalog to the page. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. For a demonstration of both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_CatalogZoneBase_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/textdisplaywebpart.cs#9)] - [!code-vb[WebParts_CatalogZoneBase_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/textdisplaywebpart.vb#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/textdisplaywebpart.cs" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/textdisplaywebpart.vb" id="Snippet9"::: Note that for the code example to work, there is a setting you must add in the Web.config file to enable exporting Web Parts description files. Ensure that you have a Web.config file in the same directory as the Web page for this code example. Within the `` section, make sure there is a `` element with an `enableExport` attribute set to `true`, as in the following markup. @@ -179,8 +179,8 @@ The second part of the example shows how to access the property programmatically, by using a toggle button to enable or disable it. - [!code-csharp[WebParts_CatalogZoneBase_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#3)] - [!code-vb[WebParts_CatalogZoneBase_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet3"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, you can examine the customized text on the control for the add verb, and you can click the **Enable or Disable Verbs** button to demonstrate that you can access the apply verb programmatically. @@ -280,8 +280,8 @@ The code example shows how to access the property, iterate through the collection, and list the IDs of all the controls in the zone. - [!code-csharp[WebParts_CatalogZoneBase_Overview#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#4)] - [!code-vb[WebParts_CatalogZoneBase_Overview#4](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet4"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, you can click the **List CatalogParts** button to demonstrate how the property can be accessed. @@ -383,8 +383,8 @@ The second part of the example shows how to access the property programmatically, by using a toggle button to enable or disable it. - [!code-csharp[WebParts_CatalogZoneBase_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#3)] - [!code-vb[WebParts_CatalogZoneBase_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet3"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, by positioning your mouse pointer over the **Close** button, you can see its description text in a ToolTip. You can also click the **Enable or Disable Verbs** button to demonstrate that you can access the close verb programmatically. @@ -569,8 +569,8 @@ In the second part of the code example, the value of the property in the first zone is programmatically assigned to a different value. - [!code-csharp[WebParts_CatalogZoneBase_Overview#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#5)] - [!code-vb[WebParts_CatalogZoneBase_Overview#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet5"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, notice the values of each property displayed in the header area of each zone. You can click the **Set Zone Text Properties** button, and the property of the upper zone is set to the value assigned to it in the code. @@ -619,8 +619,8 @@ In the second part of the code example, the value of the property in the first zone is programmatically assigned to a different value. - [!code-csharp[WebParts_CatalogZoneBase_Overview#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#5)] - [!code-vb[WebParts_CatalogZoneBase_Overview#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet5"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, notice the value of the property displayed in the header area of each zone. You can click the **Set Zone Text Properties** button, and the property of the upper zone is set to the value assigned to it in the code. @@ -875,8 +875,8 @@ In the second part of the code example, the text color for the unselected controls is set to a different value. - [!code-csharp[WebParts_CatalogZoneBase_Overview#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#7)] - [!code-vb[WebParts_CatalogZoneBase_Overview#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet7"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, notice the style attributes of the unselected controls listed in the zone (by default, the selected control is the control). You can click the **Change Part Link Styles** button to change the text color of the unselected controls. You can also click the links for the unselected controls, to see how the style attributes change when a control is selected. @@ -1233,8 +1233,8 @@ In the second part of the code example, the text value for the property of the currently selected control is displayed. - [!code-csharp[WebParts_CatalogZoneBase_Overview#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#6)] - [!code-vb[WebParts_CatalogZoneBase_Overview#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet6"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, click one of the links to a control to select it. Then click the **Show Selected CatalogPart ID** button to display the property value. Notice that the value of the property is the value that was set declaratively for the zone. If you select the other controls in the zone, the same value becomes the value of the property for each control when it is selected. If you do not set the value of the property, the default value is always the value of the property for the currently selected control. @@ -1300,8 +1300,8 @@ In the second part of the code example, the text color for the selected control is set to a different value. - [!code-csharp[WebParts_CatalogZoneBase_Overview#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#7)] - [!code-vb[WebParts_CatalogZoneBase_Overview#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet7"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, click the link for one of the listed controls, and notice the style attributes of the selected control. You can click the **Change Part Link Styles** button to change the text color of the selected control. You can also click the links for the unselected controls, to see how the style attributes change when a control is selected. @@ -1356,8 +1356,8 @@ In the second part of the code example, the value of the property is changed programmatically. - [!code-csharp[WebParts_CatalogZoneBase_Overview#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx#5)] - [!code-vb[WebParts_CatalogZoneBase_Overview#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/CS/catalogzonebasecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogZoneBase_Overview/VB/catalogzonebasevb.aspx" id="Snippet5"::: When you load the page in a browser, you can select **Catalog** from the drop-down list to switch to catalog display mode. When the catalog is visible, note the text displayed alongside the control in the footer of the catalog. You can click the **Set Zone Text Properties** button to change the text value of the property. diff --git a/xml/System.Web.UI.WebControls.WebParts/EditorZoneBase.xml b/xml/System.Web.UI.WebControls.WebParts/EditorZoneBase.xml index b01c0c26b78..66bba5e2ec9 100644 --- a/xml/System.Web.UI.WebControls.WebParts/EditorZoneBase.xml +++ b/xml/System.Web.UI.WebControls.WebParts/EditorZoneBase.xml @@ -60,8 +60,8 @@ The third part of the code example is a custom class that shows how to work with a number of the class members. The custom class derives from so that it can be used with a zone template in the declarative markup of the Web page. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation; thus, you will notice that the `Register` directive near the top of the Web page does not reference an assembly file. For a walkthrough that demonstrates both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_EditorZoneBase_Common#12](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#12)] - [!code-vb[WebParts_EditorZoneBase_Common#12](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#12)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb" id="Snippet12"::: When you load the page in a browser, you can select **Edit Mode** from the drop-down list to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of one of the two controls, and click **Edit** to edit the control. When the editing UI is visible, you can see the effects of the various declarative and programmatic uses of the class members. @@ -163,8 +163,8 @@ The second part of the example shows how to access the property programmatically, by using a toggle button to enable or disable it. - [!code-csharp[WebParts_EditorZoneBase_Common#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#4)] - [!code-vb[WebParts_EditorZoneBase_Common#4](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx" id="Snippet4"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing UI are visible, you can see the button that represents the apply verb, and click the **Toggle ApplyVerb Enabled** button to enable or disable it. @@ -233,8 +233,8 @@ The second part of the example shows how to access the property programmatically, by using a toggle button to enable or disable it. - [!code-csharp[WebParts_EditorZoneBase_Common#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#5)] - [!code-vb[WebParts_EditorZoneBase_Common#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx" id="Snippet5"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing UI are visible, you can see the button that represents the cancel verb, and click the **Toggle CancelVerb Enabled** button to enable or disable it. @@ -489,8 +489,8 @@ The second part of the code example programmatically accesses the property and lists the ID of each control in a control. - [!code-csharp[WebParts_EditorZoneBase_Common#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#6)] - [!code-vb[WebParts_EditorZoneBase_Common#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx" id="Snippet6"::: When you load the page in a browser, you can click the **Display EditorParts Collection** button to list the IDs of all the controls referenced in the property. @@ -737,8 +737,8 @@ The second part of the example shows how to access the programmatically, by using a toggle button to enable or disable it. - [!code-csharp[WebParts_EditorZoneBase_Common#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#7)] - [!code-vb[WebParts_EditorZoneBase_Common#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx" id="Snippet7"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing UI are visible, you can see the button that represents the OK verb, and click the **Toggle OKVerb Enabled** button to enable or disable it. @@ -787,8 +787,8 @@ The custom editor zone derives from the class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the method, setting the background color of the zone to a specified color, and then calls the base method, which destroys all child and controls in preparation for entering or exiting edit display mode. - [!code-csharp[WebParts_EditorZoneBase_Common#13](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#13)] - [!code-vb[WebParts_EditorZoneBase_Common#13](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#13)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs" id="Snippet13"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb" id="Snippet13"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing user interface (UI) are visible, you can see that the zone has the background color specified in the code. @@ -864,8 +864,8 @@ The custom editor zone derives from the class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the method, setting the background color of the specific control that is being edited, and then calls the base method. - [!code-csharp[WebParts_EditorZoneBase_Common#14](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#14)] - [!code-vb[WebParts_EditorZoneBase_Common#14](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#14)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs" id="Snippet14"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb" id="Snippet14"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the and editing user interface (UI) are visible, you can see that the selected control has the background color specified in the code. @@ -981,8 +981,8 @@ The custom editor zone derives from the class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the method, adding an HTML `
` element to create a line between the header and body of the zone. It then calls the base method to render the rest of the zone's body contents. - [!code-csharp[WebParts_EditorZoneBase_Common#15](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#15)] - [!code-vb[WebParts_EditorZoneBase_Common#15](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#15)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs" id="Snippet15"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb" id="Snippet15"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing user interface (UI) are visible, you can see the line created between the header and body of the editor zone. @@ -1027,8 +1027,8 @@ The custom editor zone derives from the class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the method, adding some text to the existing value of the property for each of the zone-level verbs. It then calls the base method to render all the verbs. - [!code-csharp[WebParts_EditorZoneBase_Common#16](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#16)] - [!code-vb[WebParts_EditorZoneBase_Common#16](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#16)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs" id="Snippet16"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb" id="Snippet16"::: When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the control and editing user interface (UI) are visible, you can see the text has been changed on the buttons for the zone-level verbs at the bottom of the zone. diff --git a/xml/System.Web.UI.WebControls.WebParts/IWebActionable.xml b/xml/System.Web.UI.WebControls.WebParts/IWebActionable.xml index 5114529a702..a60d9ba0ed9 100644 --- a/xml/System.Web.UI.WebControls.WebParts/IWebActionable.xml +++ b/xml/System.Web.UI.WebControls.WebParts/IWebActionable.xml @@ -84,8 +84,8 @@ The following portion of the code example demonstrates a custom implementation of the property within a user control. - [!code-csharp[WebParts_IWebActionable_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebActionable_Overview/CS/usercontrolverbcs.ascx#3)] - [!code-vb[WebParts_IWebActionable_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebActionable_Overview/VB/usercontrolverbvb.ascx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebActionable_Overview/CS/usercontrolverbcs.ascx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebActionable_Overview/VB/usercontrolverbvb.ascx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/IWebPart.xml b/xml/System.Web.UI.WebControls.WebParts/IWebPart.xml index c3e73b79a5f..5d8c85b7612 100644 --- a/xml/System.Web.UI.WebControls.WebParts/IWebPart.xml +++ b/xml/System.Web.UI.WebControls.WebParts/IWebPart.xml @@ -87,16 +87,16 @@ The first part of the code example shows how the user control implements the property. - [!code-csharp[WebParts_IWebPart_Overview#8](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#8)] - [!code-vb[WebParts_IWebPart_Overview#8](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet8"::: The second part of the code example demonstrates the method in the user control that programmatically sets the value of the property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the **Update** button. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_IWebPart_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#9)] - [!code-vb[WebParts_IWebPart_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet9"::: The third part of the code example shows how the user control that implements the interface is referenced in a control, and how the property is set declaratively on the control. Note that because there is no catalog of Web Parts controls provided with this example, you cannot see the actual effect of setting this property. @@ -143,16 +143,16 @@ The first part of the code example shows how the user control implements the property. - [!code-csharp[WebParts_IWebPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#3)] - [!code-vb[WebParts_IWebPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet3"::: The second part of the code example demonstrates the method in the user control that programmatically sets the value of the property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the **Update** button. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_IWebPart_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#9)] - [!code-vb[WebParts_IWebPart_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet9"::: The third part of the code example shows how the user control that implements the interface is referenced in a control, and how the property is set declaratively on the control. Note that you can see the value of this property by positioning your mouse pointer over the title text in the control's title bar, after you have loaded the page in a browser. You can also experiment with changing the property value programmatically at run time by loading the Web page and using the provided user interface (UI) to change the property value. @@ -201,8 +201,8 @@ The first part of the code example shows how the user control implements the property. Note that the property is read-only and is meant to be used to provide a default subtitle that is appended to the main title of a control. - [!code-csharp[WebParts_IWebPart_Overview#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#5)] - [!code-vb[WebParts_IWebPart_Overview#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet5"::: The second part of the code example shows how the user control that implements the interface is referenced in a control, and how the writable properties from are set declaratively on the control. After you load the page in a browser, note that the default value of the property, which was set in the user control's implementation code, is appended to the title in the control's title bar. @@ -250,16 +250,16 @@ The first part of the code example shows how the user control implements the property. - [!code-csharp[WebParts_IWebPart_Overview#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#4)] - [!code-vb[WebParts_IWebPart_Overview#4](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet4"::: The second part of the code example demonstrates the method in the user control that programmatically sets the value of the property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the **Update** button. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_IWebPart_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#9)] - [!code-vb[WebParts_IWebPart_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet9"::: The third part of the code example shows how the user control that implements the interface is referenced in a control, and how the property is set declaratively on the control. @@ -308,16 +308,16 @@ The first part of the code example shows how the user control implements the property. - [!code-csharp[WebParts_IWebPart_Overview#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#6)] - [!code-vb[WebParts_IWebPart_Overview#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet6"::: The second part of the code example demonstrates the method in the user control that programmatically sets the value of the property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the **Update** button. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_IWebPart_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#9)] - [!code-vb[WebParts_IWebPart_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet9"::: The third part of the code example shows how the user control that implements the interface is referenced in a control, and how the property is set declaratively on the control. Note that if you do not provide the URL to a real image, a placeholder for the icon appears in the title bar. @@ -366,16 +366,16 @@ The first part of the code example shows how the user control implements the property. - [!code-csharp[WebParts_IWebPart_Overview#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#7)] - [!code-vb[WebParts_IWebPart_Overview#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet7"::: The second part of the code example demonstrates the method in the user control that programmatically sets the value of the property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the **Update** button. > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_IWebPart_Overview#9](~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx#9)] - [!code-vb[WebParts_IWebPart_Overview#9](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_IWebPart_Overview/CS/accountusercontrolcs.ascx" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_IWebPart_Overview/VB/accountusercontrolvb.ascx" id="Snippet9"::: The third part of the code example shows how the user control that implements the interface is referenced in a control, and how the property is set declaratively on the control. Note that if you do not provide a URL to a real page, and then a user clicks the link in the title bar, an error message appears. diff --git a/xml/System.Web.UI.WebControls.WebParts/ImportCatalogPart.xml b/xml/System.Web.UI.WebControls.WebParts/ImportCatalogPart.xml index 73d871dcc16..b7e035baba1 100644 --- a/xml/System.Web.UI.WebControls.WebParts/ImportCatalogPart.xml +++ b/xml/System.Web.UI.WebControls.WebParts/ImportCatalogPart.xml @@ -82,8 +82,8 @@ The custom control called `TextDisplayWebPart` is referenced on the Web page with an `` element. The other control, called `UserInfoWebPart`, is also declared on the Web page initially, though you will remove it later to demonstrate the ability to import a description file for a control. - [!code-csharp[WebParts_ImportCatalogPart_Overview#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/userinfowebpart.cs#6)] - [!code-vb[WebParts_ImportCatalogPart_Overview#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/userinfowebpart.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/userinfowebpart.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/userinfowebpart.vb" id="Snippet6"::: Now run the code example. Load the Web page in a browser. The first step is to edit the `UserInfoWebPart` control. Use the **Display Mode** drop-down list control and select **Edit** to switch the page to edit mode. Click the verbs menu of the `UserInfoWebPart` control (the downward arrow in the title bar), and then click **Edit**. When the editing UI appears, several editing controls appear below the `UserInfoWebPart` control that you can use to edit its field values. Edit some fields, click **OK**, and then use the **Display Mode** drop-down to return the page to browse mode. @@ -174,8 +174,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. @@ -313,8 +313,8 @@ The third part of the code example is the source code for the two controls. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation. For a walkthrough that demonstrates both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_ImportCatalogPart_Get#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/CS/userinfowebpart.cs#6)] - [!code-vb[WebParts_ImportCatalogPart_Get#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/VB/userinfowebpart.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/CS/userinfowebpart.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/VB/userinfowebpart.vb" id="Snippet6"::: Now run the code example. Load the Web page in a browser. The first step is export a .WebPart description file for each control (for the `TextDisplayWebPart` and for the `UserInfoWebPart` control). For each control, click the verbs menu on the control (represented by the downward arrow in the title bar), and click **Export**. Follow the instructions to save a .WebPart description file for the control. After you have exported a description file for each control, close the Web page, and edit the page source in an editor. Delete the `` and the `` control declaration elements, then save and close the file. (You are doing this step to simulate a user who does not yet have these controls, so you can import the controls to the page). @@ -389,8 +389,8 @@ The third part of the code example is the source code for the two controls. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation. For a walkthrough that demonstrates both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_ImportCatalogPart_Get#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/CS/userinfowebpart.cs#6)] - [!code-vb[WebParts_ImportCatalogPart_Get#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/VB/userinfowebpart.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/CS/userinfowebpart.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Get/VB/userinfowebpart.vb" id="Snippet6"::: Now run the code example. Load the Web page in a browser. The first step is export a .WebPart description file for each control (for the `TextDisplayWebPart` and for the `UserInfoWebPart` control). For each control, click the verbs menu on the control (represented by the downward arrow in the title bar), and click **Export**. Follow the instructions to save a .WebPart description file for the control. After you have exported a description file for each control, close the Web page, and edit the page source in an editor. Delete the `` and the `` control declaration elements, then save and close the file. (You are doing this step to simulate a user who does not yet have these controls, so you can import the controls to the page). @@ -445,8 +445,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. @@ -542,8 +542,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. @@ -662,8 +662,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. @@ -709,8 +709,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. @@ -756,8 +756,8 @@ In this section of code, the property value is assigned programmatically. - [!code-csharp[WebParts_ImportCatalogPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx#3)] - [!code-vb[WebParts_ImportCatalogPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/CS/ImportCatalogPartOverviewCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ImportCatalogPart_Overview/VB/ImportCatalogPartOverviewVB.aspx" id="Snippet3"::: When you load the page in a browser, you can use the **Display Mode** drop-down list control to select **Catalog Mode** and switch the page to catalog mode. With the page in catalog mode and the description file uploaded, note the various text strings displayed in the user interface (UI) for the control. If you click the **Upload Description File** button, the text for several of the properties in the UI is changed, including the text for the property. diff --git a/xml/System.Web.UI.WebControls.WebParts/LayoutEditorPart.xml b/xml/System.Web.UI.WebControls.WebParts/LayoutEditorPart.xml index 3c2995e96b4..15a55c080ad 100644 --- a/xml/System.Web.UI.WebControls.WebParts/LayoutEditorPart.xml +++ b/xml/System.Web.UI.WebControls.WebParts/LayoutEditorPart.xml @@ -390,8 +390,8 @@ The next part of the code example shows how to set the value of the property programmatically. - [!code-csharp[WebParts_LayoutEditorPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_LayoutEditorPart_Overview/CS/layouteditorpartcs.aspx#3)] - [!code-vb[WebParts_LayoutEditorPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_LayoutEditorPart_Overview/VB/layouteditorpartvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_LayoutEditorPart_Overview/CS/layouteditorpartcs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_LayoutEditorPart_Overview/VB/layouteditorpartvb.aspx" id="Snippet3"::: When you load the page in a browser, you can select **Edit Mode** in the **Display Mode** drop-down list control to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of the **Author List WebPart** control, and click **Edit** to begin editing. When the editing user interface (UI) is visible, you can see the control, and a button and text box positioned above it. Note that the title of the control is the value assigned to it in the declarative markup of the Web page. If you enter some text in the text box next to the **Update EditorPart Title** button, and then click the button, the title for the control is updated. diff --git a/xml/System.Web.UI.WebControls.WebParts/PersonalizationAdministration.xml b/xml/System.Web.UI.WebControls.WebParts/PersonalizationAdministration.xml index 3ce7690a5f8..7496cfc8b91 100644 --- a/xml/System.Web.UI.WebControls.WebParts/PersonalizationAdministration.xml +++ b/xml/System.Web.UI.WebControls.WebParts/PersonalizationAdministration.xml @@ -482,7 +482,7 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_PersAdmin#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet2"::: ]]> @@ -565,7 +565,7 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_PersAdmin#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet2"::: ]]> @@ -1039,7 +1039,7 @@ ## Examples The following code example demonstrates how to use the method. The complete example can be found in the class overview topic. - [!code-csharp[WebParts_PersAdmin#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet5"::: ]]> @@ -1210,7 +1210,7 @@ ## Examples The following code example demonstrates how to use the property. - [!code-csharp[WebParts_PersAdmin#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/PersonalizationScope.xml b/xml/System.Web.UI.WebControls.WebParts/PersonalizationScope.xml index b04f1ee9f2e..015e850c454 100644 --- a/xml/System.Web.UI.WebControls.WebParts/PersonalizationScope.xml +++ b/xml/System.Web.UI.WebControls.WebParts/PersonalizationScope.xml @@ -32,7 +32,7 @@ ## Examples The following example demonstrates using the `PersonalizationScope` enumeration: - [!code-csharp[WebParts_PersAdmin#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet6"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/PersonalizationStateInfoCollection.xml b/xml/System.Web.UI.WebControls.WebParts/PersonalizationStateInfoCollection.xml index 963b5c54be0..9917b1085e2 100644 --- a/xml/System.Web.UI.WebControls.WebParts/PersonalizationStateInfoCollection.xml +++ b/xml/System.Web.UI.WebControls.WebParts/PersonalizationStateInfoCollection.xml @@ -202,7 +202,7 @@ ## Examples The following code example demonstrates how to use the property. - [!code-csharp[WebParts_PersAdmin#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PersAdmin/CS/PersAdmin.ascx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/PropertyGridEditorPart.xml b/xml/System.Web.UI.WebControls.WebParts/PropertyGridEditorPart.xml index fed923e3b82..6b56e8c980c 100644 --- a/xml/System.Web.UI.WebControls.WebParts/PropertyGridEditorPart.xml +++ b/xml/System.Web.UI.WebControls.WebParts/PropertyGridEditorPart.xml @@ -84,8 +84,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[WebParts_PropertyGridEditorPart_Overview#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/CS/userinfowebpart.cs#5)] - [!code-vb[WebParts_PropertyGridEditorPart_Overview#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/VB/userinfowebpart.vb#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/CS/userinfowebpart.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/VB/userinfowebpart.vb" id="Snippet5"::: When you load the page in a browser, select **Edit Mode** in the **Display Mode** drop-down list control to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of the **User Information WebPart** control, and click **Edit** to edit the control. When the editing UI is visible, you can see the control. Notice that a control is rendered for each of the properties of the `UserInfoWebPart` class, based on the type of the property. If you make some changes in the editing UI and click the **Apply** button, you can use the **Display Mode** drop-down list to return the page to browse mode and see the full effect of the editing changes. @@ -394,8 +394,8 @@ The next part of the code example shows how to set the value of the property programmatically. In order to persist the programmatically assigned value, a static variable named `editControlTitle` is used, and this value is assigned to the property each time the control is initialized, so that the value is persisted between postback events. - [!code-csharp[WebParts_PropertyGridEditorPart_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/CS/propertyGridEditorPartCS.aspx#3)] - [!code-vb[WebParts_PropertyGridEditorPart_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/VB/propertyGridEditorPartVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/CS/propertyGridEditorPartCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_PropertyGridEditorPart_Overview/VB/propertyGridEditorPartVB.aspx" id="Snippet3"::: When you load the page in a browser, you can select **Edit Mode** in the **Display Mode** drop-down list control to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of the **User Information WebPart** control, and click **Edit** to begin editing. When the editing user interface (UI) is visible, you can see the control, and a button and text box positioned above it. Note that the title of the control is the value assigned to it in the declarative markup of the Web page. If you enter some text in the text box next to the **Update EditorPart Title** button, and then click the button, the title for the control is updated. diff --git a/xml/System.Web.UI.WebControls.WebParts/ProxyWebPartManager.xml b/xml/System.Web.UI.WebControls.WebParts/ProxyWebPartManager.xml index 4f1de91809e..e4a20fe37fe 100644 --- a/xml/System.Web.UI.WebControls.WebParts/ProxyWebPartManager.xml +++ b/xml/System.Web.UI.WebControls.WebParts/ProxyWebPartManager.xml @@ -80,8 +80,8 @@ For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation. For a walkthrough that demonstrates how to compile, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_ProxyWebPartManager_Overview#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_ProxyWebPartManager_Overview/CS/ZipCodeComponent.cs#4)] - [!code-vb[WebParts_ProxyWebPartManager_Overview#4](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ProxyWebPartManager_Overview/VB/ZipCodeComponent.vb#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_ProxyWebPartManager_Overview/CS/ZipCodeComponent.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_ProxyWebPartManager_Overview/VB/ZipCodeComponent.vb" id="Snippet4"::: The third part of the code example is the master page. You should take the following source code and save it in a file, naming it MasterPageCS.master or MasterPageVB.master (depending on which language you use). Note that the master page contains a `Register` directive to register the user control, and it references the user control itself in the body of the page. The master page also declares the single `` element used for this page and all related content pages. Finally, the master page has an `` element that declares the point in the page where the content page is inserted. diff --git a/xml/System.Web.UI.WebControls.WebParts/WebPartDescription.xml b/xml/System.Web.UI.WebControls.WebParts/WebPartDescription.xml index 6cf770f2a87..e105ca5ab04 100644 --- a/xml/System.Web.UI.WebControls.WebParts/WebPartDescription.xml +++ b/xml/System.Web.UI.WebControls.WebParts/WebPartDescription.xml @@ -57,8 +57,8 @@ The second part of the code example is a custom control. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses the approach of dynamic compilation. For a walkthrough that demonstrates how to compile, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08). - [!code-csharp[WebParts_WebPartDescription_Overview#3](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/textdisplaywebpart.cs#3)] - [!code-vb[WebParts_WebPartDescription_Overview#3](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/textdisplaywebpart.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/textdisplaywebpart.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/textdisplaywebpart.vb" id="Snippet3"::: The third part of the code example is the Web page. Near the top are two `Register` directives: one that registers the user control, and the other to register the custom control whose source file is located in the App_Code folder of your site. The page contains an `` element, which in turn contains declarative references to two controls: the custom control named `TextDisplayWebPart`, and a Web server control that will be treated as a control at run time because the control will wrap it with a object. Note that in the code for the `Button1_Click` method, the available objects for the controls in the catalog are retrieved using the method, and then the description details are all written out to the page. @@ -200,8 +200,8 @@ The following code in the `Button1_Click` method of a Web page demonstrates how to get the collection of objects in a catalog using the method, and then to display the details of each control in the catalog by looping through the objects. Note that the property value is retrieved in the following code. - [!code-csharp[WebParts_WebPartDescription_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx#2)] - [!code-vb[WebParts_WebPartDescription_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx" id="Snippet2"::: ]]> @@ -249,8 +249,8 @@ The following code in the `Button1_Click` method of a Web page demonstrates how to get the collection of objects in a catalog using the method, and then to display the details of each control in the catalog by looping through the objects. Note that the property value is retrieved in the following code. - [!code-csharp[WebParts_WebPartDescription_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx#2)] - [!code-vb[WebParts_WebPartDescription_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx" id="Snippet2"::: ]]> @@ -298,8 +298,8 @@ The following code in the `Button1_Click` method of a Web page demonstrates how to get the collection of objects in a catalog using the method, and then to display the details of each control in the catalog by looping through the objects. Note that the property value is retrieved in the following code. - [!code-csharp[WebParts_WebPartDescription_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx#2)] - [!code-vb[WebParts_WebPartDescription_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx" id="Snippet2"::: ]]> @@ -347,8 +347,8 @@ The following code in the `Button1_Click` method of a Web page demonstrates how to get the collection of objects in a catalog using the method, and then to display the details of each control in the catalog by looping through the objects. Note that the property value is retrieved in the following code. - [!code-csharp[WebParts_WebPartDescription_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx#2)] - [!code-vb[WebParts_WebPartDescription_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/CS/wpDescriptioncs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartDescription_Overview/VB/wpDescriptionvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls.WebParts/WebPartPersonalization.xml b/xml/System.Web.UI.WebControls.WebParts/WebPartPersonalization.xml index 9708ef8822a..adc7357a1b0 100644 --- a/xml/System.Web.UI.WebControls.WebParts/WebPartPersonalization.xml +++ b/xml/System.Web.UI.WebControls.WebParts/WebPartPersonalization.xml @@ -266,8 +266,8 @@ ## Examples The following code demonstrates using the property. This code is part of a larger code sample found in the class description. - [!code-csharp[WebParts_WebPartPersonalization#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx#7)] - [!code-vb[WebParts_WebPartPersonalization#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx" id="Snippet7"::: ]]> @@ -916,8 +916,8 @@ ## Examples The following code demonstrates using the property. This code is part of a larger code sample found in the class description. - [!code-csharp[WebParts_WebPartPersonalization#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx#6)] - [!code-vb[WebParts_WebPartPersonalization#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx" id="Snippet6"::: ]]> @@ -1396,8 +1396,8 @@ The i ## Examples The following code demonstrates using the method. This code is part of a larger code sample found in the class description. - [!code-csharp[WebParts_WebPartPersonalization#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx#7)] - [!code-vb[WebParts_WebPartPersonalization#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartPersonalization/CS/persMode.ascx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartPersonalization/VB/persMode.ascx" id="Snippet7"::: ]]> diff --git a/xml/System.Web.UI.WebControls/Content.xml b/xml/System.Web.UI.WebControls/Content.xml index 6bc8ab1fac2..ccf004cd1eb 100644 --- a/xml/System.Web.UI.WebControls/Content.xml +++ b/xml/System.Web.UI.WebControls/Content.xml @@ -67,7 +67,7 @@ ## Examples The following code example shows how to use the control to define the content for a master page. The first Web page is a master page and defines a content region using a control. - [!code-xml[System.Web.UI.MasterPage_1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/MasterPageSample_1cs.master#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/MasterPageSample_1cs.master" id="Snippet1"::: The following code example demonstrates how to use a content page for the preceding master page. The text, markup, and any server controls that are defined within the control template are rendered to the on the master page. diff --git a/xml/System.Web.UI.WebControls/ContentPlaceHolder.xml b/xml/System.Web.UI.WebControls/ContentPlaceHolder.xml index baef00e164c..f8f648d977a 100644 --- a/xml/System.Web.UI.WebControls/ContentPlaceHolder.xml +++ b/xml/System.Web.UI.WebControls/ContentPlaceHolder.xml @@ -88,12 +88,12 @@ ## Examples The following code example shows how the control is used to define a content region for a master page. The first Web page is a master page, and defines a content region using a control. - [!code-xml[System.Web.UI.MasterPage_1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/MasterPageSample_1cs.master#1)] + :::code language="xml" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/MasterPageSample_1cs.master" id="Snippet1"::: The following code example demonstrates a content page for the preceding master page. The text, markup, and any server controls defined within the control template are rendered to the on the master page. - [!code-csharp[System.Web.UI.MasterPage_1#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/samplemasterclass.cs#3)] - [!code-vb[System.Web.UI.MasterPage_1#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/VB/samplemasterclass.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/CS/samplemasterclass.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.MasterPage_1/VB/samplemasterclass.vb" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ControlParameter.xml b/xml/System.Web.UI.WebControls/ControlParameter.xml index 5d6e28aaddf..13794e43610 100644 --- a/xml/System.Web.UI.WebControls/ControlParameter.xml +++ b/xml/System.Web.UI.WebControls/ControlParameter.xml @@ -192,8 +192,8 @@ ## Examples The following code shows how to create objects by using the constructor. The parameters bind to the values of and controls to enter data in a database from a Web Forms page. - [!code-csharp[System.Web.UI.WebControls.AccessDataSource_3#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.AccessDataSource_3/CS/webform5cs.aspx#2)] - [!code-vb[System.Web.UI.WebControls.AccessDataSource_3#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.AccessDataSource_3/VB/webform5vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.AccessDataSource_3/CS/webform5cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.AccessDataSource_3/VB/webform5vb.aspx" id="Snippet2"::: ]]> @@ -266,8 +266,8 @@ ## Examples The following code shows how to use the constructor to create two objects and associate them with a control. - [!code-csharp[System.Web.UI.WebControls.ControlParameter_3#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ControlParameter_3/CS/webform5cs.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ControlParameter_3#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ControlParameter_3/VB/webform5vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ControlParameter_3/CS/webform5cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ControlParameter_3/VB/webform5vb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/CookieParameter.xml b/xml/System.Web.UI.WebControls/CookieParameter.xml index d399fbdbd2b..24fb870e4a1 100644 --- a/xml/System.Web.UI.WebControls/CookieParameter.xml +++ b/xml/System.Web.UI.WebControls/CookieParameter.xml @@ -96,8 +96,8 @@ The following code-behind module is used with the previous Web Forms page. - [!code-csharp[System.Web.UI.WebControls.CookieParameter_2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/CS/cookieparam2cs.aspx.cs#2)] - [!code-vb[System.Web.UI.WebControls.CookieParameter_2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/VB/cookieparam2vb.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/CS/cookieparam2cs.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/VB/cookieparam2vb.aspx.vb" id="Snippet2"::: ]]> @@ -165,8 +165,8 @@ ## Examples The following code example demonstrates how to create a object using the constructor, and add it to a control's collection. - [!code-csharp[System.Web.UI.WebControls.CookieParameter_4#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_4/CS/cp4cs.aspx#2)] - [!code-vb[System.Web.UI.WebControls.CookieParameter_4#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_4/VB/cp4vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_4/CS/cp4cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_4/VB/cp4vb.aspx" id="Snippet2"::: ]]> @@ -237,8 +237,8 @@ ## Examples The following code example demonstrates how to create a object using the constructor, and add it to a control's collection. - [!code-csharp[System.Web.UI.WebControls.CookieParameter_3#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_3/CS/cp3cs.aspx#2)] - [!code-vb[System.Web.UI.WebControls.CookieParameter_3#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_3/VB/cp3vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_3/CS/cp3cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_3/VB/cp3vb.aspx" id="Snippet2"::: ]]> @@ -318,8 +318,8 @@ The following code example demonstrates how to programmatically create a object, set its properties, and add it to a control's collection. - [!code-csharp[System.Web.UI.WebControls.CookieParameter_2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/CS/cookieparam2cs.aspx.cs#2)] - [!code-vb[System.Web.UI.WebControls.CookieParameter_2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/VB/cookieparam2vb.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/CS/cookieparam2cs.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.CookieParameter_2/VB/cookieparam2vb.aspx.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/DataPager.xml b/xml/System.Web.UI.WebControls/DataPager.xml index 6becc0cc658..c26af9f191f 100644 --- a/xml/System.Web.UI.WebControls/DataPager.xml +++ b/xml/System.Web.UI.WebControls/DataPager.xml @@ -526,8 +526,8 @@ The following example shows how to use the property to dynamically add a object to a control. This code example is part of a larger example provided for the constructor. - [!code-csharp[System.Web.UI.WebControls.NextPreviousPagerField.Ctor#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/CS/NextPreviousPagerFieldCtorCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.NextPreviousPagerField.Ctor#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/VB/NextPreviousPagerFieldCtorVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/CS/NextPreviousPagerFieldCtorCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/VB/NextPreviousPagerFieldCtorVB.aspx" id="Snippet2"::: ]]> @@ -904,8 +904,8 @@ ## Examples The following example shows how to use the property to dynamically associate a control with a control. This code example is part of a larger example provided for the constructor. - [!code-csharp[System.Web.UI.WebControls.DataPager.Ctor#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPager.Ctor/CS/DataPagerCtorCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPager.Ctor#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPager.Ctor/VB/DataPagerCtorVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPager.Ctor/CS/DataPagerCtorCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPager.Ctor/VB/DataPagerCtorVB.aspx" id="Snippet2"::: The following example shows how to declaratively set the property in a control in order to page the data of a control. diff --git a/xml/System.Web.UI.WebControls/DataPagerCommandEventArgs.xml b/xml/System.Web.UI.WebControls/DataPagerCommandEventArgs.xml index a7b881d7514..065ec824598 100644 --- a/xml/System.Web.UI.WebControls/DataPagerCommandEventArgs.xml +++ b/xml/System.Web.UI.WebControls/DataPagerCommandEventArgs.xml @@ -139,8 +139,8 @@ ## Examples The following example shows how to use the property to retrieve a control that is contained in the object. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx" id="Snippet2"::: ]]> @@ -193,8 +193,8 @@ ## Examples The following example shows how to use the property to set the maximum number of records to display on each page of data. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx" id="Snippet2"::: ]]> @@ -248,8 +248,8 @@ ## Examples The following example shows how to use the property to set the index of the first record to display in a control. The record to display is based on the page number that is specified by the user. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx" id="Snippet2"::: ]]> @@ -339,8 +339,8 @@ ## Examples The following example shows how to use the property to check whether the user requested an item that does not exist in the control. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/DataPagerFieldCollection.xml b/xml/System.Web.UI.WebControls/DataPagerFieldCollection.xml index 3bc1fb9a17c..6c8c619b579 100644 --- a/xml/System.Web.UI.WebControls/DataPagerFieldCollection.xml +++ b/xml/System.Web.UI.WebControls/DataPagerFieldCollection.xml @@ -108,8 +108,8 @@ ## Examples The following example shows how to use the method to add a object to a control. - [!code-csharp[System.Web.UI.WebControls.NextPreviousPagerField.Ctor#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/CS/NextPreviousPagerFieldCtorCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.NextPreviousPagerField.Ctor#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/VB/NextPreviousPagerFieldCtorVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/CS/NextPreviousPagerFieldCtorCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.NextPreviousPagerField.Ctor/VB/NextPreviousPagerFieldCtorVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/DataPagerFieldItem.xml b/xml/System.Web.UI.WebControls/DataPagerFieldItem.xml index 34ec8fecd30..868fe133751 100644 --- a/xml/System.Web.UI.WebControls/DataPagerFieldItem.xml +++ b/xml/System.Web.UI.WebControls/DataPagerFieldItem.xml @@ -136,8 +136,8 @@ ## Examples The following example shows how to access properties of the control by using the property in a handler for the event. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.DataPagerCommandEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/CS/DataPagerCommandEventArgsCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.DataPagerCommandEventArgs/VB/DataPagerCommandEventArgsVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/LinqDataSource.xml b/xml/System.Web.UI.WebControls/LinqDataSource.xml index 85d954102f6..f729796c915 100644 --- a/xml/System.Web.UI.WebControls/LinqDataSource.xml +++ b/xml/System.Web.UI.WebControls/LinqDataSource.xml @@ -228,8 +228,8 @@ The following example shows an event handler for the event that sets the data object based on a value in the Web page. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs#3)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb" id="Snippet3"::: The following example shows a control that is configured to group by two columns. The `Key` property references an object that has two properties, `ProductCategory` and `Color`. The object represented by `It` is renamed (aliased) to `Products`. The renamed `Products` object contains a collection of the individual records in a grouping. Each instance will contain all the columns from the `Products` table. @@ -552,8 +552,8 @@ ## Examples The following example shows how to create the data context object by using a non-parameterless constructor during the event. The code assigns the object to the property. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.ContextCreating#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.ContextCreating/cs/Default.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.ContextCreating#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.ContextCreating/vb/Default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.ContextCreating/cs/Default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.ContextCreating/vb/Default.aspx.vb" id="Snippet1"::: ]]> @@ -651,8 +651,8 @@ The following example shows the class named `MovieLibrary` that is referenced in the control. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource_Overview#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/cs/App_Code/MovieLibrary.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource_Overview#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/vb/App_Code/MovieLibrary.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/cs/App_Code/MovieLibrary.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/vb/App_Code/MovieLibrary.vb" id="Snippet1"::: ]]> @@ -867,8 +867,8 @@ ## Examples The following example shows an event handler for the event. The code cancels the delete operation based on a property in the property and a value from the Web page. In the example, when the `OnSale` property is set to `true`, the user must select a control to confirm that a record should be deleted. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.Deleting#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Deleting/cs/Default.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.Deleting#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Deleting/vb/Default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Deleting/cs/Default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Deleting/vb/Default.aspx.vb" id="Snippet1"::: ]]> @@ -1326,8 +1326,8 @@ The control supports only one vi ## Examples The following example shows how to programmatically insert a new record in the data source after the user clicks a button. The code passes a object that contains default values to the method. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.Insert#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Insert/cs/Default2.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.Insert#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Insert/vb/Default2.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Insert/cs/Default2.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Insert/vb/Default2.aspx.vb" id="Snippet1"::: The following example shows the markup for the previous example. @@ -1373,8 +1373,8 @@ The control supports only one vi ## Examples The following example shows how to create an event handler for the event that checks for exceptions and retrieves the identity property for the new record. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx" id="Snippet1"::: ]]> @@ -1419,8 +1419,8 @@ The control supports only one vi ## Examples The following example shows an event handler for the event that modifies data before the insert operation. The object from the property is cast to a type named `Product`. The `DateModified` property of the `Product` object is set to the current date and time. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.Inserting#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Inserting/cs/Default.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.Inserting#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Inserting/vb/Default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Inserting/cs/Default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Inserting/vb/Default.aspx.vb" id="Snippet1"::: The following example shows an event handler for the event that retrieves validation exceptions. @@ -2055,8 +2055,8 @@ The `LoadViewState` method is used to load the previously saved view state of th ## Examples The following example shows an event handler for the event. The handler creates a query that retrieves values from an array of string values in the Web page. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs#3)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb" id="Snippet3"::: The following example shows how to assign the property to the object that is returned from a method that represents a stored procedure. @@ -2350,8 +2350,8 @@ protected void LinqDataSource_Selecting(object sender, The following example shows the class named `MovieLibrary` that is referenced in the control. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource_Overview#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/cs/App_Code/MovieLibrary.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource_Overview#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/vb/App_Code/MovieLibrary.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/cs/App_Code/MovieLibrary.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource_Overview/vb/App_Code/MovieLibrary.vb" id="Snippet1"::: ]]> @@ -2418,8 +2418,8 @@ protected void LinqDataSource_Selecting(object sender, ## Examples The following example shows how to programmatically update a record in the data source after the user clicks a button. The code passes a object that contains the key value, a object that contains the original values, and a object that contains the new values to the method. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.Update#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Update/cs/Default2.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.Update#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Update/vb/Default3.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Update/cs/Default2.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Update/vb/Default3.aspx.vb" id="Snippet1"::: The following example shows the markup for the previous example. @@ -2547,8 +2547,8 @@ protected void LinqDataSource_Selecting(object sender, ## Examples The following example shows an event handler for the event. The code compares properties from the property and the property to see whether a value has changed. If the value has changed, a value of the property is set to `true`. - [!code-csharp[System.Web.UI.WebControls.LinqDataSource.Updating#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Updating/cs/Default.aspx.cs#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSource.Updating#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Updating/vb/Default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Updating/cs/Default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSource.Updating/vb/Default.aspx.vb" id="Snippet1"::: The following example shows an event handler for the event that retrieves validation exceptions. diff --git a/xml/System.Web.UI.WebControls/LinqDataSourceSelectEventArgs.xml b/xml/System.Web.UI.WebControls/LinqDataSourceSelectEventArgs.xml index d284dd4a361..c042a9df12c 100644 --- a/xml/System.Web.UI.WebControls/LinqDataSourceSelectEventArgs.xml +++ b/xml/System.Web.UI.WebControls/LinqDataSourceSelectEventArgs.xml @@ -33,13 +33,13 @@ ## Examples The following example shows how to set the property to the result of a search made by using language-integrated query (LINQ). - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default2.aspx.cs#2)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/default2.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default2.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/default2.aspx.vb" id="Snippet2"::: The following example shows how to set the property to an array of string values that is defined in the Web page. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs#3)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb" id="Snippet3"::: ]]> @@ -282,13 +282,13 @@ ## Examples The following example shows how to set the property to the result of a LINQ query. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default2.aspx.cs#2)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/default2.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default2.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/default2.aspx.vb" id="Snippet2"::: The following example shows how to set the property to an array of string values is defined in the Web page. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs#3)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default3.aspx.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default3.aspx.vb" id="Snippet3"::: ]]> @@ -331,8 +331,8 @@ ## Examples The following example shows how to add a parameter to the collection. The added parameter is used to calculate an adjusted price for a product based on whether products are on discounted. The first part of the example shows the event handler for the event. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default5.aspx#5)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceSelectEventArgs#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default5.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/cs/Default5.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceSelectEventArgs/vb/Default5.aspx" id="Snippet5"::: The second part of the example shows the markup that defines the Select clause. diff --git a/xml/System.Web.UI.WebControls/LinqDataSourceStatusEventArgs.xml b/xml/System.Web.UI.WebControls/LinqDataSourceStatusEventArgs.xml index 85cc5605e7c..69b0a0596f2 100644 --- a/xml/System.Web.UI.WebControls/LinqDataSourceStatusEventArgs.xml +++ b/xml/System.Web.UI.WebControls/LinqDataSourceStatusEventArgs.xml @@ -31,8 +31,8 @@ ## Examples The following example shows an event handler for the event. In the event handler, if the property is `null`, the product ID is retrieved from the object in the property. The product ID is a primary key for the table and is set by the database, therefore the value is not known until the insert operation has finished. The exception message is logged if the property is not equal to `null`. The property is then set to `true`. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx" id="Snippet1"::: ]]> @@ -165,8 +165,8 @@ ## Examples The following example shows an event handler for the event. In the event handler, if the property is `null`, the product ID is retrieved from the object in the property. The product ID is a primary key for the table and is set by the database, so the value is not known until the insert operation has finished. The exception message is logged if the property is not equal to `null`. The property is then set to `true`. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx" id="Snippet1"::: ]]> @@ -213,8 +213,8 @@ ## Examples The following example shows an event handler for the event. In the event handler, if the property is `null`, the product ID is retrieved from the object in the property. The product ID is a primary key for the table and is set by the database, therefore the value is not known until the insert operation has finished. The exception message is logged if the property is not equal to `null`. The property is then set to `true`. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx" id="Snippet1"::: ]]> @@ -260,8 +260,8 @@ ## Examples The following example shows an event handler for the event. In the event handler, if the property is `null`, the product ID is retrieved from the object in the property. The product ID is a primary key for the table and is set by the database, therefore the value is not known until the insert operation has finished. The exception message is logged if the property is not equal to `null`. The property is then set to `true`. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx#1)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/cs/Default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs/vb/Default.aspx" id="Snippet1"::: ]]> @@ -321,8 +321,8 @@ The following example shows the code for the event handler for the event. The value of the property is assigned to the control. - [!code-csharp[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount/cs/Default.aspx.cs#2)] - [!code-vb[System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount/vb/Default.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount/cs/Default.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.TotalRowCount/vb/Default.aspx.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListItemCollection.xml b/xml/System.Web.UI.WebControls/ListItemCollection.xml index ec59ede4687..f2d89d6ac90 100644 --- a/xml/System.Web.UI.WebControls/ListItemCollection.xml +++ b/xml/System.Web.UI.WebControls/ListItemCollection.xml @@ -114,8 +114,8 @@ ## Examples The following code example demonstrates creating objects, adding items to the collections, and removing items from the collections. To view this code in a fully working example, see the class topic. - [!code-csharp[ListItemCollectionSample#5](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx#5)] - [!code-vb[ListItemCollectionSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx" id="Snippet5"::: ]]> @@ -164,8 +164,8 @@ ## Examples The following code example demonstrates creating objects, adding items to the collections, and removing items from the collections. To view this code in a fully working example, see the class topic. - [!code-csharp[ListItemCollectionSample#5](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx#5)] - [!code-vb[ListItemCollectionSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx" id="Snippet5"::: ]]> @@ -320,8 +320,8 @@ ## Examples - [!code-csharp[ListItemCollection_Remove#4](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Remove/CS/listitemcollection_remove.cs.aspx#4)] - [!code-vb[ListItemCollection_Remove#4](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Remove/VB/listitemcollection_remove.vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Remove/CS/listitemcollection_remove.cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Remove/VB/listitemcollection_remove.vb.aspx" id="Snippet4"::: ]]> @@ -408,8 +408,8 @@ ## Examples - [!code-csharp[ListItemCollection_Remove#5](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Remove/CS/listitemcollection_remove.cs.aspx#5)] - [!code-vb[ListItemCollection_Remove#5](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Remove/VB/listitemcollection_remove.vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Remove/CS/listitemcollection_remove.cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Remove/VB/listitemcollection_remove.vb.aspx" id="Snippet5"::: ]]> @@ -450,8 +450,8 @@ ## Examples To view the following code in a fully working example, see the class topic. - [!code-csharp[ListBoxMultiSelectExample#4](~/snippets/csharp/VS_Snippets_WebNet/ListBoxMultiSelectExample/CS/listitemcollectioncs.aspx#4)] - [!code-vb[ListBoxMultiSelectExample#4](~/snippets/visualbasic/VS_Snippets_WebNet/ListBoxMultiSelectExample/VB/listitemcollectionvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListBoxMultiSelectExample/CS/listitemcollectioncs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListBoxMultiSelectExample/VB/listitemcollectionvb.aspx" id="Snippet4"::: ]]> @@ -491,8 +491,8 @@ ## Examples - [!code-csharp[ListItemCollection_Search#1](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Search/CS/listitemcollection_search.cs.aspx#1)] - [!code-vb[ListItemCollection_Search#1](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Search/VB/listitemcollection_search.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Search/CS/listitemcollection_search.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Search/VB/listitemcollection_search.vb.aspx" id="Snippet1"::: ]]> @@ -534,8 +534,8 @@ ## Examples - [!code-csharp[ListItemCollection_Search#2](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Search/CS/listitemcollection_search.cs.aspx#2)] - [!code-vb[ListItemCollection_Search#2](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Search/VB/listitemcollection_search.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection_Search/CS/listitemcollection_search.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection_Search/VB/listitemcollection_search.vb.aspx" id="Snippet2"::: ]]> @@ -586,8 +586,8 @@ ## Examples - [!code-csharp[DataListItemCollection#5](~/snippets/csharp/VS_Snippets_WebNet/DataListItemCollection/CS/datalistitemcollection.cs.aspx#5)] - [!code-vb[DataListItemCollection#5](~/snippets/visualbasic/VS_Snippets_WebNet/DataListItemCollection/VB/datalistitemcollection.vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataListItemCollection/CS/datalistitemcollection.cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataListItemCollection/VB/datalistitemcollection.vb.aspx" id="Snippet5"::: ]]> @@ -878,8 +878,8 @@ ## Examples The following example demonstrates the method of the class. The Web page contains a control with some list items in it and a control named `Delete`. The user enters the text of the item to delete into the control. The event handler of the `Button1` control deletes the selected item from the object and therefore from the control. - [!code-csharp[ListItemCollection#3](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection/CS/listitemcollection_addrange.cs.aspx#3)] - [!code-vb[ListItemCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection/VB/listitemcollection_addrange.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollection/CS/listitemcollection_addrange.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollection/VB/listitemcollection_addrange.vb.aspx" id="Snippet3"::: ]]> @@ -926,8 +926,8 @@ ## Examples The following code example demonstrates creating objects, adding items to the collections, and removing items from the collections. In the example, the named `listBoxData` is used as the data source for a control called `ListBox1`, and the called `ddBoxData` is used as the data source for a control called `DropDownList1`. To view this code in a fully working example, see the class topic. - [!code-csharp[ListItemCollectionSample#6](~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx#6)] - [!code-vb[ListItemCollectionSample#6](~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ListItemCollectionSample/CS/listitemcollection2cs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ListItemCollectionSample/VB/listitemcollection2vb.aspx" id="Snippet6"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListView.xml b/xml/System.Web.UI.WebControls/ListView.xml index f41743425d5..11b1bdbdfa0 100644 --- a/xml/System.Web.UI.WebControls/ListView.xml +++ b/xml/System.Web.UI.WebControls/ListView.xml @@ -1534,8 +1534,8 @@ ## Examples The following example shows how to use the property to determine the data-key values for the items in a control. It also shows how to preserve the user selection based on a data item instead of the default behavior that uses the index. - [!code-csharp[System.Web.UI.WebControls.ListView.SelectedIndexChanged#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanged/CS/ListViewItemSelectedIndexChanged2CS.aspx#3)] - [!code-vb[System.Web.UI.WebControls.ListView.SelectedIndexChanged#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanged/VB/ListViewItemSelectedIndexChanged2VB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanged/CS/ListViewItemSelectedIndexChanged2CS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanged/VB/ListViewItemSelectedIndexChanged2VB.aspx" id="Snippet3"::: ]]> @@ -1683,8 +1683,8 @@ ## Examples The following example shows how to use the property to determine whether an item is in edit mode in the control. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListViewDataItem#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/CS/ListViewDataItemDataItemCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListViewDataItem#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/VB/ListViewDataItemDataItemVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/CS/ListViewDataItemDataItemCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/VB/ListViewDataItemDataItemVB.aspx" id="Snippet2"::: ]]> @@ -3734,8 +3734,8 @@ ## Examples The following example shows how to use the collection to access the item that is being edited in a control. This code example is part of a larger example provided for the event. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemEditing#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/CS/ListViewItemEditingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemEditing#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/VB/ListViewItemEditingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/CS/ListViewItemEditingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/VB/ListViewItemEditingVB.aspx" id="Snippet2"::: ]]> @@ -5578,8 +5578,8 @@ ## Examples The following example shows how to use the property to determine whether an item is selected in a control. This code example is part of a larger example provided for the method. - [!code-csharp[System.Web.UI.WebControls.ListView.DeleteItem#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.DeleteItem/CS/ListViewDeleteItemCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.DeleteItem#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.DeleteItem/VB/ListViewDeleteItemVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.DeleteItem/CS/ListViewDeleteItemCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.DeleteItem/VB/ListViewDeleteItemVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewCancelEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewCancelEventArgs.xml index ff789c44088..53a6f261dde 100644 --- a/xml/System.Web.UI.WebControls/ListViewCancelEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewCancelEventArgs.xml @@ -126,8 +126,8 @@ ## Examples The following example shows how to use the property to determine the data-entry mode that the control was in when the user clicked the Cancel button. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx" id="Snippet2"::: ]]> @@ -174,8 +174,8 @@ ## Examples The following example shows how to use the property to determine the index of the edit item that contains the Cancel button that was clicked by the user. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewCancelMode.xml b/xml/System.Web.UI.WebControls/ListViewCancelMode.xml index ad2d84f611a..7f01e6c5bd9 100644 --- a/xml/System.Web.UI.WebControls/ListViewCancelMode.xml +++ b/xml/System.Web.UI.WebControls/ListViewCancelMode.xml @@ -26,8 +26,8 @@ ## Examples The following example shows how to use the enumeration to check which operation is being canceled in a item. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemCanceling#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/CS/ListViewItemCancelingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemCanceling/VB/ListViewItemCancelingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewDataItem.xml b/xml/System.Web.UI.WebControls/ListViewDataItem.xml index 8e29bfc2d1d..9a4ec7f7935 100644 --- a/xml/System.Web.UI.WebControls/ListViewDataItem.xml +++ b/xml/System.Web.UI.WebControls/ListViewDataItem.xml @@ -141,8 +141,8 @@ ## Examples The following example shows how to use the property to retrieve a field value. The value is then used to pre-select an item in a control that is displayed when an item is in edit mode. This code example is part of a larger example that is provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListViewDataItem#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/CS/ListViewDataItemDataItemCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListViewDataItem#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/VB/ListViewDataItemDataItemVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/CS/ListViewDataItemDataItemCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewDataItem/VB/ListViewDataItemDataItemVB.aspx" id="Snippet2"::: ]]> @@ -237,8 +237,8 @@ ## Examples The following example shows how to use the property to retrieve the index of the item that is being edited. This code example is part of a larger example provided for the method. - [!code-csharp[System.Web.UI.WebControls.ListView.UpdateItem#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.UpdateItem/CS/ListViewUpdateItemCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.UpdateItem#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.UpdateItem/VB/ListViewUpdateItemVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.UpdateItem/CS/ListViewUpdateItemCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.UpdateItem/VB/ListViewUpdateItemVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewEditEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewEditEventArgs.xml index 0c14d4f9d9e..d38c6eb9ebc 100644 --- a/xml/System.Web.UI.WebControls/ListViewEditEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewEditEventArgs.xml @@ -120,8 +120,8 @@ ## Examples The following example shows how to use the property to retrieve the object that is being edited. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemEditing#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/CS/ListViewItemEditingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemEditing#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/VB/ListViewItemEditingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/CS/ListViewItemEditingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemEditing/VB/ListViewItemEditingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewInsertEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewInsertEventArgs.xml index 34887fcb41c..074034e7cbb 100644 --- a/xml/System.Web.UI.WebControls/ListViewInsertEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewInsertEventArgs.xml @@ -165,8 +165,8 @@ ## Examples The following example shows how to iterate through the collection. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemInserting#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserting/CS/ListViewItemInsertingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemInserting#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserting/VB/ListViewItemInsertingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserting/CS/ListViewItemInsertingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserting/VB/ListViewItemInsertingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewInsertedEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewInsertedEventArgs.xml index 5dc4b96f4e7..545a5ce6669 100644 --- a/xml/System.Web.UI.WebControls/ListViewInsertedEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewInsertedEventArgs.xml @@ -137,8 +137,8 @@ ## Examples The following example shows how to use the object that is passed to a handler for the event to determine whether an exception was raised during the insert operation. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx#3)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx" id="Snippet3"::: ]]> @@ -186,8 +186,8 @@ ## Examples The following example shows how to use the object that is passed to a handler for the event to determine whether an exception was raised during the insert operation. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx#3)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx" id="Snippet3"::: ]]> @@ -240,8 +240,8 @@ ## Examples The following example shows how to use the object that is passed to the handler for the event to determine whether an exception was raised during the insert operation. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx#3)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx" id="Snippet3"::: ]]> @@ -294,8 +294,8 @@ ## Examples The following example shows how to use the property to preserve the values entered by the user when an error occurs during the insert operation. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx#3)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemInserted#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/CS/ListViewItemInsertedCS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemInserted/VB/ListViewItemInsertedVB.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewItem.xml b/xml/System.Web.UI.WebControls/ListViewItem.xml index 967b2579a61..4e50863d13d 100644 --- a/xml/System.Web.UI.WebControls/ListViewItem.xml +++ b/xml/System.Web.UI.WebControls/ListViewItem.xml @@ -243,8 +243,8 @@ ## Examples The following example shows how to use the property to determine whether the item that is being created is a data item. If the item is a data item, the email address is displayed in italic. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListViewItem#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewItem/CS/ListViewItemCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListViewItem#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewItem/VB/ListViewItemVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewItem/CS/ListViewItemCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListViewItem/VB/ListViewItemVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewItemEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewItemEventArgs.xml index ec2ac95027d..d9999ed00a5 100644 --- a/xml/System.Web.UI.WebControls/ListViewItemEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewItemEventArgs.xml @@ -126,8 +126,8 @@ ## Examples The following example shows how to use the property to access the properties of the item that is being bound to data. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemDataBound#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemDataBound/CS/ListViewItemDataBoundCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemDataBound#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemDataBound/VB/ListViewItemDataBoundVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemDataBound/CS/ListViewItemDataBoundCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemDataBound/VB/ListViewItemDataBoundVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewSelectEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewSelectEventArgs.xml index 825d43b05fe..463a61ac862 100644 --- a/xml/System.Web.UI.WebControls/ListViewSelectEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewSelectEventArgs.xml @@ -121,8 +121,8 @@ ## Examples The following example shows how to use the property of the object to access the item that was selected by the user. - [!code-csharp[System.Web.UI.WebControls.ListView.SelectedIndexChanging#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanging/CS/ListViewItemSelectedIndexChangingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.SelectedIndexChanging#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanging/VB/ListViewItemSelectedIndexChangingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanging/CS/ListViewItemSelectedIndexChangingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.SelectedIndexChanging/VB/ListViewItemSelectedIndexChangingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewSortEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewSortEventArgs.xml index 265e5ec3b67..afef9cd1acd 100644 --- a/xml/System.Web.UI.WebControls/ListViewSortEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewSortEventArgs.xml @@ -126,8 +126,8 @@ ## Examples The following example shows how to use the object to display the sort direction and the column being sorted. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.Sorting#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/CS/ListViewSortingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.Sorting#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/VB/ListViewSortingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/CS/ListViewSortingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/VB/ListViewSortingVB.aspx" id="Snippet2"::: ]]> @@ -179,8 +179,8 @@ ## Examples The following example shows how to use the object to display the sort direction and the column being sorted. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.Sorting#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/CS/ListViewSortingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.Sorting#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/VB/ListViewSortingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/CS/ListViewSortingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.Sorting/VB/ListViewSortingVB.aspx" id="Snippet2"::: The following example shows how to set the property in order to sort multiple columns with different sort directions applied to each column. diff --git a/xml/System.Web.UI.WebControls/ListViewUpdateEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewUpdateEventArgs.xml index 896b1410fc6..dbed521cb58 100644 --- a/xml/System.Web.UI.WebControls/ListViewUpdateEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewUpdateEventArgs.xml @@ -221,8 +221,8 @@ ## Examples The following example shows how to use the property to make sure that the user has supplied all values before the data source is updated. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemUpdating#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdating/CS/ListViewItemUpdatingCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemUpdating#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdating/VB/ListViewItemUpdatingVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdating/CS/ListViewItemUpdatingCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdating/VB/ListViewItemUpdatingVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/ListViewUpdatedEventArgs.xml b/xml/System.Web.UI.WebControls/ListViewUpdatedEventArgs.xml index a44440ef613..6629f5149e6 100644 --- a/xml/System.Web.UI.WebControls/ListViewUpdatedEventArgs.xml +++ b/xml/System.Web.UI.WebControls/ListViewUpdatedEventArgs.xml @@ -138,8 +138,8 @@ ## Examples The following example shows how to use the property to verify that an item was updated. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx" id="Snippet2"::: ]]> @@ -188,8 +188,8 @@ ## Examples The following example shows how to use the property to determine whether an exception occurred during an update operation. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx" id="Snippet2"::: ]]> @@ -240,8 +240,8 @@ ## Examples The following example shows how to use the property to indicate that the exception was handled in the event handler. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx" id="Snippet2"::: ]]> @@ -292,8 +292,8 @@ ## Examples The following example shows how to use the property to keep a control in edit mode when an exception occurs. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx#2)] - [!code-vb[System.Web.UI.WebControls.ListView.ItemUpdated#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/CS/ListViewItemUpdatedCS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ListView.ItemUpdated/VB/ListViewItemUpdatedVB.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/MailDefinition.xml b/xml/System.Web.UI.WebControls/MailDefinition.xml index a3393739dc5..c8e381f6e1e 100644 --- a/xml/System.Web.UI.WebControls/MailDefinition.xml +++ b/xml/System.Web.UI.WebControls/MailDefinition.xml @@ -153,8 +153,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#3](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#3)] - [!code-vb[MailDefinitionClassSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet3"::: ]]> @@ -207,8 +207,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#4](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#4)] - [!code-vb[MailDefinitionClassSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet4"::: ]]> @@ -274,15 +274,15 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#7](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#7)] - [!code-vb[MailDefinitionClassSample#7](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet7"::: The following code example uses the method to create a new email message from a text file. This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#8](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#8)] - [!code-vb[MailDefinitionClassSample#8](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet8"::: ]]> @@ -350,15 +350,15 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#7](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#7)] - [!code-vb[MailDefinitionClassSample#7](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet7"::: The following code example uses the method to create a new email message from text entered in a control on a Web Forms page. This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#8](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#8)] - [!code-vb[MailDefinitionClassSample#8](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet8"::: ]]> @@ -463,8 +463,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#5](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#5)] - [!code-vb[MailDefinitionClassSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet5"::: ]]> @@ -558,8 +558,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#10](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#10)] - [!code-vb[MailDefinitionClassSample#10](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#10)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet10"::: ]]> @@ -611,8 +611,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[MailDefinitionClassSample#6](~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx#6)] - [!code-vb[MailDefinitionClassSample#6](~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MailDefinitionClassSample/CS/maildefinitionsamplecs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MailDefinitionClassSample/VB/maildefinitionsamplevb.aspx" id="Snippet6"::: ]]> diff --git a/xml/System.Web.UI.WebControls/PasswordRecovery.xml b/xml/System.Web.UI.WebControls/PasswordRecovery.xml index cfcae2b50dc..574d76b3969 100644 --- a/xml/System.Web.UI.WebControls/PasswordRecovery.xml +++ b/xml/System.Web.UI.WebControls/PasswordRecovery.xml @@ -2408,7 +2408,7 @@ The following code example shows how to set the property programmatically. This code example is part of a larger example provided for the property. - [!code-csharp[PasswordRecoveryButton#3](~/snippets/csharp/VS_Snippets_WebNet/PasswordRecoveryButton/CS/passwordrecoverybuttoncs.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PasswordRecoveryButton/CS/passwordrecoverybuttoncs.aspx" id="Snippet3"::: ]]> @@ -2551,8 +2551,8 @@ The following code example sets the property programmatically. This code example is part of a larger example provided for the property. - [!code-csharp[PasswordRecoveryButton#4](~/snippets/csharp/VS_Snippets_WebNet/PasswordRecoveryButton/CS/passwordrecoverybuttoncs.aspx#4)] - [!code-vb[PasswordRecoveryButton#4](~/snippets/visualbasic/VS_Snippets_WebNet/PasswordRecoveryButton/VB/passwordrecoverybuttonvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PasswordRecoveryButton/CS/passwordrecoverybuttoncs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PasswordRecoveryButton/VB/passwordrecoverybuttonvb.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.UI.WebControls/RepeaterItemCollection.xml b/xml/System.Web.UI.WebControls/RepeaterItemCollection.xml index b8b76659ffd..942293d6d55 100644 --- a/xml/System.Web.UI.WebControls/RepeaterItemCollection.xml +++ b/xml/System.Web.UI.WebControls/RepeaterItemCollection.xml @@ -43,8 +43,8 @@ ## Examples - [!code-csharp[RepeaterItemCollection_Members#1](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#1)] - [!code-vb[RepeaterItemCollection_Members#1](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet1"::: ]]> @@ -91,8 +91,8 @@ ## Examples - [!code-csharp[RepeaterItemCollection_Members#1](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#1)] - [!code-vb[RepeaterItemCollection_Members#1](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet1"::: ]]> @@ -141,8 +141,8 @@ ## Examples To see this code in the context of a complete example, see the class topic. - [!code-csharp[RepeaterItemCollection_Members#4](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#4)] - [!code-vb[RepeaterItemCollection_Members#4](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet4"::: ]]> @@ -183,8 +183,8 @@ ## Examples To see this code in the context of a complete example, see the class topic. - [!code-csharp[RepeaterItemCollection_Members#3](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#3)] - [!code-vb[RepeaterItemCollection_Members#3](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet3"::: ]]> @@ -235,8 +235,8 @@ ## Examples To see this code in the context of a complete example, see the class topic. - [!code-csharp[RepeaterItemCollection_Members#5](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#5)] - [!code-vb[RepeaterItemCollection_Members#5](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet5"::: ]]> @@ -348,8 +348,8 @@ ## Examples To see this code in the context of a complete example, see the class topic. - [!code-csharp[RepeaterItemCollection_Members#3](~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx#3)] - [!code-vb[RepeaterItemCollection_Members#3](~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RepeaterItemCollection_Members/CS/repeateritemcollection_members.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RepeaterItemCollection_Members/VB/repeateritemcollection_members.vb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls/RoleGroup.xml b/xml/System.Web.UI.WebControls/RoleGroup.xml index 64902cdfff8..dcd0ed7b60e 100644 --- a/xml/System.Web.UI.WebControls/RoleGroup.xml +++ b/xml/System.Web.UI.WebControls/RoleGroup.xml @@ -204,8 +204,8 @@ ## Examples The following code example assigns a list of roles to associate with a role group. This code example is part of a larger example provided for the class. - [!code-csharp[RoleGroupClass#3](~/snippets/csharp/VS_Snippets_WebNet/RoleGroupClass/CS/rolegroupclasscs.aspx#3)] - [!code-vb[RoleGroupClass#3](~/snippets/visualbasic/VS_Snippets_WebNet/RoleGroupClass/VB/rolegroupclassvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RoleGroupClass/CS/rolegroupclasscs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RoleGroupClass/VB/rolegroupclassvb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI.WebControls/RoleGroupCollection.xml b/xml/System.Web.UI.WebControls/RoleGroupCollection.xml index 709c44a718f..ee20c514de4 100644 --- a/xml/System.Web.UI.WebControls/RoleGroupCollection.xml +++ b/xml/System.Web.UI.WebControls/RoleGroupCollection.xml @@ -98,8 +98,8 @@ ## Examples The following code example adds a dynamically created object to the . This code example is part of a larger example provided for the class. - [!code-csharp[RoleGroupClass#2](~/snippets/csharp/VS_Snippets_WebNet/RoleGroupClass/CS/rolegroupclasscs.aspx#2)] - [!code-vb[RoleGroupClass#2](~/snippets/visualbasic/VS_Snippets_WebNet/RoleGroupClass/VB/rolegroupclassvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/RoleGroupClass/CS/rolegroupclasscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/RoleGroupClass/VB/rolegroupclassvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI.WebControls/TableCell.xml b/xml/System.Web.UI.WebControls/TableCell.xml index 088c9f6c57d..86ed274098c 100644 --- a/xml/System.Web.UI.WebControls/TableCell.xml +++ b/xml/System.Web.UI.WebControls/TableCell.xml @@ -180,8 +180,8 @@ ## Examples The following example demonstrates how to programmatically create a new instance of a control. - [!code-csharp[TableCell#5](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#5)] - [!code-vb[TableCell#5](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet5"::: ]]> @@ -228,8 +228,8 @@ [!code-aspx-csharp[CustomTableCellAddAttributesToRender#1](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/CS/custom_tablecell_addattributestorendercs.aspx#1)] [!code-aspx-vb[CustomTableCellAddAttributesToRender#1](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/VB/custom_tablecell_addattributestorendervb.aspx#1)] - [!code-csharp[CustomTableCellAddAttributesToRender#2](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/CS/custom_tablecell_addattributestorender.cs#2)] - [!code-vb[CustomTableCellAddAttributesToRender#2](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/VB/custom_tablecell_addattributestorender.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/CS/custom_tablecell_addattributestorender.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellAddAttributesToRender/VB/custom_tablecell_addattributestorender.vb" id="Snippet2"::: ]]> @@ -450,8 +450,8 @@ HorizontalAlign="Left">(2,0) [!code-aspx-csharp[CustomTableCellCreateControlStyle#1](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/CS/custom_tablecell_createcontrolstylecs.aspx#1)] [!code-aspx-vb[CustomTableCellCreateControlStyle#1](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/VB/custom_tablecell_createcontrolstylevb.aspx#1)] - [!code-csharp[CustomTableCellCreateControlStyle#2](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/CS/custom_tablecell_createcontrolstyle.cs#2)] - [!code-vb[CustomTableCellCreateControlStyle#2](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/VB/custom_tablecell_createcontrolstyle.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/CS/custom_tablecell_createcontrolstyle.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellCreateControlStyle/VB/custom_tablecell_createcontrolstyle.vb" id="Snippet2"::: ]]> @@ -569,8 +569,8 @@ HorizontalAlign="Left">(2,0) [!code-aspx-csharp[CustomTableCellRenderContents#1](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellRenderContents/CS/custom_tablecell_rendercontentscs.aspx#1)] [!code-aspx-vb[CustomTableCellRenderContents#1](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellRenderContents/VB/custom_tablecell_rendercontentsvb.aspx#1)] - [!code-csharp[CustomTableCellRenderContents#2](~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellRenderContents/CS/custom_tablecell_rendercontents.cs#2)] - [!code-vb[CustomTableCellRenderContents#2](~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellRenderContents/VB/custom_tablecell_rendercontents.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomTableCellRenderContents/CS/custom_tablecell_rendercontents.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomTableCellRenderContents/VB/custom_tablecell_rendercontents.vb" id="Snippet2"::: ]]> @@ -712,8 +712,8 @@ HorizontalAlign="Left">(2,0) This code example is part of a larger example provided for the class. - [!code-csharp[TableCell#5](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#5)] - [!code-vb[TableCell#5](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet5"::: ]]> diff --git a/xml/System.Web.UI.WebControls/TableCellCollection.xml b/xml/System.Web.UI.WebControls/TableCellCollection.xml index f59a052d5cb..81ef2878698 100644 --- a/xml/System.Web.UI.WebControls/TableCellCollection.xml +++ b/xml/System.Web.UI.WebControls/TableCellCollection.xml @@ -201,8 +201,8 @@ ## Examples The following example demonstrates how to use the method to add the objects from an array to a . Note that in the example, the property of the is an instance of the class. - [!code-csharp[TableCellCollection_AddRange#1](~/snippets/csharp/VS_Snippets_WebNet/TableCellCollection_AddRange/CS/tablecellcollection_addrange.cs.aspx#1)] - [!code-vb[TableCellCollection_AddRange#1](~/snippets/visualbasic/VS_Snippets_WebNet/TableCellCollection_AddRange/VB/tablecellcollection_addrange.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCellCollection_AddRange/CS/tablecellcollection_addrange.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCellCollection_AddRange/VB/tablecellcollection_addrange.vb.aspx" id="Snippet1"::: ]]> @@ -346,8 +346,8 @@ ## Examples The following example demonstrates how to use the property to determine the number of cells in the . Note that in the example, the property of the is an instance the class. - [!code-csharp[Classic TableCellCollection.Count Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic TableCellCollection.Count Example/CS/source.cs#1)] - [!code-vb[Classic TableCellCollection.Count Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic TableCellCollection.Count Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic TableCellCollection.Count Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic TableCellCollection.Count Example/VB/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI.WebControls/TableHeaderCell.xml b/xml/System.Web.UI.WebControls/TableHeaderCell.xml index acd947ff6fb..8b6734bcfc8 100644 --- a/xml/System.Web.UI.WebControls/TableHeaderCell.xml +++ b/xml/System.Web.UI.WebControls/TableHeaderCell.xml @@ -73,8 +73,8 @@ ## Examples The following example demonstrates how to programmatically add a control to a Web page. For a complete, working code example, see the class overview topic. - [!code-csharp[TableCell#7](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#7)] - [!code-vb[TableCell#7](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet7"::: ]]> diff --git a/xml/System.Web.UI.WebControls/TableRow+CellControlCollection.xml b/xml/System.Web.UI.WebControls/TableRow+CellControlCollection.xml index fcca7cc6298..bd412a22897 100644 --- a/xml/System.Web.UI.WebControls/TableRow+CellControlCollection.xml +++ b/xml/System.Web.UI.WebControls/TableRow+CellControlCollection.xml @@ -31,8 +31,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[TableCell#5](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#5)] - [!code-vb[TableCell#5](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet5"::: ]]> @@ -76,8 +76,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[TableCell#5](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#5)] - [!code-vb[TableCell#5](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet5"::: ]]> diff --git a/xml/System.Web.UI.WebControls/TableRow.xml b/xml/System.Web.UI.WebControls/TableRow.xml index 775ca0e6500..69fbfe262b5 100644 --- a/xml/System.Web.UI.WebControls/TableRow.xml +++ b/xml/System.Web.UI.WebControls/TableRow.xml @@ -245,8 +245,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[TableCell#5](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#5)] - [!code-vb[TableCell#5](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet5"::: ]]> @@ -421,8 +421,8 @@ ## Examples The following example demonstrates how to use the property. For a complete, working code example, see the class overview topic. - [!code-csharp[TableCell#4](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#4)] - [!code-vb[TableCell#4](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet4"::: ]]> @@ -570,8 +570,8 @@ ## Examples The following example demonstrates how to use the property. For a complete, working code example, see the class overview topic. - [!code-csharp[TableCell#4](~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx#4)] - [!code-vb[TableCell#4](~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TableCell/CS/tablecellcs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TableCell/VB/tablecellvb.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.UI/AttributeCollection.xml b/xml/System.Web.UI/AttributeCollection.xml index b18e9acab92..ae18ac1ea19 100644 --- a/xml/System.Web.UI/AttributeCollection.xml +++ b/xml/System.Web.UI/AttributeCollection.xml @@ -32,8 +32,8 @@ ## Examples The following example creates a new object that is named `myAttributeCollection`, and then checks whether the page has been posted back. If it has not, the code adds two attributes to the collection. It then gets the number of attributes in the collection and iterates through the collection, writing the key to each attribute to the page. If the page is a postback, the code gets the new number of attributes and iterates through the collection, writing the key and value of each attribute to the page. - [!code-csharp[AttributeCollection_AttributeCollection#1](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx#1)] - [!code-vb[AttributeCollection_AttributeCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx" id="Snippet1"::: ]]> @@ -73,8 +73,8 @@ ## Examples The following example shows how to use the constructor to create an instance of the class named it `myAttributeCollection`. The code passes the control's property as a parameter argument. - [!code-csharp[AttributeCollection_AttributeCollection#2](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx#2)] - [!code-vb[AttributeCollection_AttributeCollection#2](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx" id="Snippet2"::: ]]> @@ -162,8 +162,8 @@ ## Examples The following example shows how to add new attributes to a server control named `myButton` and a server control named `myTextBox`. It then adds those attributes to a custom object that will write those attributes to an output stream for each of those controls. - [!code-csharp[AttributeCollection_Item#1](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_Item/CS/attributecollection_item.cs.aspx#1)] - [!code-vb[AttributeCollection_Item#1](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_Item/VB/attributecollection_item.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_Item/CS/attributecollection_item.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_Item/VB/attributecollection_item.vb.aspx" id="Snippet1"::: ]]> @@ -231,8 +231,8 @@ ## Examples The following example shows how to use the property to write the number of attributes on a control to the containing page. - [!code-csharp[AttributeCollection_AttributeCollection#4](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx#4)] - [!code-vb[AttributeCollection_AttributeCollection#4](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/CS/attributecollection_attributecollection.cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_AttributeCollection/VB/attributecollection_attributecollection.vb.aspx" id="Snippet4"::: ]]> @@ -271,8 +271,8 @@ ## Examples The following example shows how to add a CSS style value programmatically to a server control's object. When a button is clicked, the background color of a server control named `TextBox1` is set to the selected item in a server control named `DropDownList1`. - [!code-csharp[AttributeCollection_CssStyle#1](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_CssStyle/CS/attributecollection_cssstyle.cs.aspx#1)] - [!code-vb[AttributeCollection_CssStyle#1](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_CssStyle/VB/attributecollection_cssstyle.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection_CssStyle/CS/attributecollection_cssstyle.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection_CssStyle/VB/attributecollection_cssstyle.vb.aspx" id="Snippet1"::: ]]> @@ -519,8 +519,8 @@ The following example shows how to create a custom control named `AttribRender` that overrides the method of the class without calling the method of the base class. Instead, `AttribRender` invokes the method. - [!code-csharp[AttributeCollection.Render_Sample1#1](~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection.Render_Sample1/CS/attributecollection_render.cs#1)] - [!code-vb[AttributeCollection.Render_Sample1#1](~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection.Render_Sample1/VB/attributecollection_render.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/AttributeCollection.Render_Sample1/CS/attributecollection_render.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/AttributeCollection.Render_Sample1/VB/attributecollection_render.vb" id="Snippet1"::: The following example shows how to use the `AttribRender` custom control in a Web page. It assumes that the code file for the custom control is in the App_Code folder for the application. diff --git a/xml/System.Web.UI/BasePartialCachingControl.xml b/xml/System.Web.UI/BasePartialCachingControl.xml index ed087e869c3..0797f4d0e13 100644 --- a/xml/System.Web.UI/BasePartialCachingControl.xml +++ b/xml/System.Web.UI/BasePartialCachingControl.xml @@ -40,8 +40,8 @@ ## Examples The following code example demonstrates how to create a reference to the class and sets it to the value of the property. The code then sets the property to a object that makes the control dependent on a text file. - [!code-csharp[BasePartialCachingControl#1](~/snippets/csharp/VS_Snippets_WebNet/BasePartialCachingControl/CS/dep1cs.ascx#1)] - [!code-vb[BasePartialCachingControl#1](~/snippets/visualbasic/VS_Snippets_WebNet/BasePartialCachingControl/VB/dep1vb.ascx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/BasePartialCachingControl/CS/dep1cs.ascx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/BasePartialCachingControl/VB/dep1vb.ascx" id="Snippet1"::: ]]> @@ -114,8 +114,8 @@ The first part of the example demonstrates how the is applied to a user control named `LogOnControl`, which means the user control is wrapped by a control at run time. The `LogOnControl` object's caching settings can be programmatically manipulated through its associated object, which is available through a reference to the that wraps it. In this example, caching settings are examined during page initialization and changed if some conditions are met. - [!code-csharp[System.Web.UI.ControlCachePolicy#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCachePolicy/CS/LogonControl.cs#2)] - [!code-vb[System.Web.UI.ControlCachePolicy#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCachePolicy/VB/logoncontrol.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCachePolicy/CS/LogonControl.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCachePolicy/VB/logoncontrol.vb" id="Snippet2"::: The second part of the example shows a user control that is used with the previous example to demonstrate user control caching. @@ -173,8 +173,8 @@ ## Examples The following code example demonstrates how to set the property to a object that makes the control dependent on a text file. This code example is part of a larger example provided for the class. - [!code-csharp[BasePartialCachingControl#2](~/snippets/csharp/VS_Snippets_WebNet/BasePartialCachingControl/CS/dep1cs.ascx#2)] - [!code-vb[BasePartialCachingControl#2](~/snippets/visualbasic/VS_Snippets_WebNet/BasePartialCachingControl/VB/dep1vb.ascx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/BasePartialCachingControl/CS/dep1cs.ascx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/BasePartialCachingControl/VB/dep1vb.ascx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/Control.xml b/xml/System.Web.UI/Control.xml index d7565876d8e..4064d3a47f2 100644 --- a/xml/System.Web.UI/Control.xml +++ b/xml/System.Web.UI/Control.xml @@ -125,8 +125,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Classic Control Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Control Example/CS/source.cs#1)] - [!code-vb[Classic Control Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Control Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control Example/VB/source.vb" id="Snippet1"::: ]]> @@ -278,8 +278,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Control_AddParsedSubObject#1](~/snippets/csharp/VS_Snippets_WebNet/Control_AddParsedSubObject/CS/control_addparsedsubobject.cs#1)] - [!code-vb[Control_AddParsedSubObject#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_AddParsedSubObject/VB/control_addparsedsubobject.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_AddParsedSubObject/CS/control_addparsedsubobject.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_AddParsedSubObject/VB/control_addparsedsubobject.vb" id="Snippet1"::: ]]> @@ -520,8 +520,8 @@ This property gathers the information necessary about a page's UI hierarchy and ## Examples The following example demonstrates an override of the method of a custom control. To ensure that child controls are not created until data binding occurs again, the property is set to `true` after the objects are created and added to the control's object. - [!code-csharp[TemplatedDataBoundControl3#1](~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl3/cs/customrepeater.cs#1)] - [!code-vb[TemplatedDataBoundControl3#1](~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl3/vb/customrepeater.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl3/cs/customrepeater.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl3/vb/customrepeater.vb" id="Snippet1"::: The following example demonstrates how to use the custom repeater control in a Web page. @@ -621,8 +621,8 @@ This property gathers the information necessary about a page's UI hierarchy and ## Examples The following code example demonstrates how to override the method for a templated data-bound control. If the data source that the control binds to is populated, the control's collection is emptied using the method, and the method is used to remove any state information that had been saved for the child controls. - [!code-csharp[TemplatedDataBoundControl2#3](~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl2/cs/templatedataboundcontrol.cs#3)] - [!code-vb[TemplatedDataBoundControl2#3](~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl2/vb/templatedataboundcontrol.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl2/cs/templatedataboundcontrol.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl2/vb/templatedataboundcontrol.vb" id="Snippet3"::: ]]> @@ -918,8 +918,8 @@ The following example shows controls that ## Examples - [!code-csharp[System.Web.UI.Control_Context_OnInit_ResolveUrl#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/CS/control1.cs#1)] - [!code-vb[System.Web.UI.Control_Context_OnInit_ResolveUrl#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/VB/control1.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/CS/control1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/VB/control1.vb" id="Snippet1"::: ]]> @@ -973,8 +973,8 @@ The following example shows controls that ## Examples The following example demonstrates how to add child controls to a server control's object through its property. - [!code-csharp[Classic Control.Controls Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Control.Controls Example/CS/source.cs#1)] - [!code-vb[Classic Control.Controls Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.Controls Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Control.Controls Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.Controls Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1032,8 +1032,8 @@ The following example shows controls that > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[SystemWebUIControl CreateChildControls and EnsureChildControls#2](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs#2)] - [!code-vb[SystemWebUIControl CreateChildControls and EnsureChildControls#2](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb" id="Snippet2"::: ]]> @@ -1077,13 +1077,13 @@ The following example shows controls that ## Examples The following code example overrides the method to create an instance of a `CustomControlCollection` class, which inherits from the class. - [!code-csharp[System.Web.UI.ControlCollection_CTor_Owner#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs#2)] - [!code-vb[System.Web.UI.ControlCollection_CTor_Owner#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb" id="Snippet2"::: The following code example uses the method in a custom server control override of the method. The new collection is created, and then populated with two child controls, `firstControl` and `secondControl`. - [!code-csharp[Control_Sample_1#1](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs#1)] - [!code-vb[Control_Sample_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb" id="Snippet1"::: ]]> @@ -1138,8 +1138,8 @@ The following example shows controls that ## Examples The following example overrides the method in a custom ASP.NET server control. It begins by calling the base method and then uses the method to delete all the child controls and the method to delete any saved view-state settings for those child controls. Finally, the property is set to `true` and the control is instructed to track any changes to the view state of the newly created controls with the method. This is a common technique when binding data to a control to ensure that new data does not conflict with data stored from a previous method call. - [!code-csharp[Control_StateManagement#6](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#6)] - [!code-vb[Control_StateManagement#6](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet6"::: ]]> @@ -1252,8 +1252,8 @@ The following example shows controls that ## Examples - [!code-csharp[ITemplate_Interface#1](~/snippets/csharp/VS_Snippets_WebNet/ITemplate_Interface/CS/itemplate.cs#1)] - [!code-vb[ITemplate_Interface#1](~/snippets/visualbasic/VS_Snippets_WebNet/ITemplate_Interface/VB/itemplate.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ITemplate_Interface/CS/itemplate.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ITemplate_Interface/VB/itemplate.vb" id="Snippet1"::: ]]> @@ -1404,8 +1404,8 @@ The following example shows controls that ## Examples The following code example overrides the method to close the object associated with a control, and call the method on a control, named `myButton`. If an is thrown when this version of the method is called, the control writes a message to the current object. - [!code-csharp[Control_Dispose#1](~/snippets/csharp/VS_Snippets_WebNet/Control_Dispose/CS/control_disposemethod.cs#1)] - [!code-vb[Control_Dispose#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Dispose/VB/control_disposemethod.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Dispose/CS/control_disposemethod.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Dispose/VB/control_disposemethod.vb" id="Snippet1"::: ]]> @@ -1561,8 +1561,8 @@ The following example shows controls that ## Examples The following example sets the property to `false`. - [!code-csharp[Control_StateManagement#7](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_statemanagement.cs.aspx#7)] - [!code-vb[Control_StateManagement#7](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_statemanagement.vb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_statemanagement.cs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_statemanagement.vb.aspx" id="Snippet7"::: ]]> @@ -1648,8 +1648,8 @@ The following example shows controls that > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[SystemWebUIControl CreateChildControls and EnsureChildControls#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs#1)] - [!code-vb[SystemWebUIControl CreateChildControls and EnsureChildControls#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb" id="Snippet1"::: ]]> @@ -1727,7 +1727,7 @@ The following example shows controls that > [!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](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs" id="Snippet1"::: ]]> @@ -1787,8 +1787,8 @@ The following example shows controls that > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[System.Web.UI.Page.Parent_FindControl#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/CS/control_parent.cs.aspx#1)] - [!code-vb[System.Web.UI.Page.Parent_FindControl#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/VB/control_parent.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/CS/control_parent.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/VB/control_parent.vb.aspx" id="Snippet1"::: ]]> @@ -2176,8 +2176,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[Control_StateManagement#5](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#5)] - [!code-vb[Control_StateManagement#5](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet5"::: ]]> @@ -2217,8 +2217,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example uses the method to determine if any controls exist before using the property to iterate through a object. - [!code-csharp[Classic Control.HasControls Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Control.HasControls Example/CS/source.cs#1)] - [!code-vb[Classic Control.HasControls Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.HasControls Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Control.HasControls Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.HasControls Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2311,8 +2311,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[Control_Sample#2](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples.cs.aspx#2)] - [!code-vb[Control_Sample#2](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples.vb.aspx" id="Snippet2"::: ]]> @@ -2449,8 +2449,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example checks whether the page that contains the server controls has posted back. If it has, it calls the method to determine whether the control contains just literal content, or is a parent control to other server controls. If it contains solely literal content, the property of the that represents that content is written to the response. - [!code-csharp[System.Web.UI.Control_ViewStateIgnoresCase#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/cs/controlsample_7.cs#1)] - [!code-vb[System.Web.UI.Control_ViewStateIgnoresCase#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/VB/controlsample_7.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/cs/controlsample_7.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/VB/controlsample_7.vb" id="Snippet1"::: ]]> @@ -2490,8 +2490,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method in a custom ASP.NET server control. It begins by calling the base method and then uses the `ControlCollection` object. method to delete all the child controls and the method to delete any saved view-state settings for those child controls. Finally, the property is set to `true`. The control then uses the property to determine whether view-state change tracking is enabled for the control. If it is not enabled, the method is called. - [!code-csharp[Control_StateManagement#4](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#4)] - [!code-vb[Control_StateManagement#4](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet4"::: ]]> @@ -2568,8 +2568,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[System.Web.UI.Control_Load#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Load/CS/control_load.cs#2)] - [!code-vb[System.Web.UI.Control_Load#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Load/VB/control_load.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Load/CS/control_load.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Load/VB/control_load.vb" id="Snippet2"::: ]]> @@ -2611,8 +2611,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", The method is overridden to call the method on the to indicate that the custom control uses control state. - [!code-csharp[ControlState#1](~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx#1)] - [!code-vb[ControlState#1](~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx" id="Snippet1"::: ]]> @@ -2656,8 +2656,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method for a custom ASP.NET server control. It creates an array to contain the view state information passed in the `savedState` parameter, and then calls the base implementation of the method for the first index location of the array. It assigns the values stored at the next two index locations to variables named `UserText` and `PasswordText`, respectively. - [!code-csharp[Control_StateManagement#1](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#1)] - [!code-vb[Control_StateManagement#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet1"::: ]]> @@ -2746,8 +2746,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example uses the method to obtain the physical path of a virtual directory of the containing or object. - [!code-csharp[Control_MapPathSecure#1](~/snippets/csharp/VS_Snippets_WebNet/Control_MapPathSecure/CS/control_templatesourcedirectory.cs#1)] - [!code-vb[Control_MapPathSecure#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_MapPathSecure/VB/control_templatesourcedirectory.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_MapPathSecure/CS/control_templatesourcedirectory.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_MapPathSecure/VB/control_templatesourcedirectory.vb" id="Snippet1"::: ]]> @@ -2852,8 +2852,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method in a custom ASP.NET server control, `ParentControl`. This method is invoked when a child control of `ParentControl` calls the method. When this happens, the `ParentControl` class writes two strings to the containing ASP.NET page, the first stating that its method has been called, the second identifying the source control of the method. - [!code-csharp[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/CS/bubble.cs#1)] - [!code-vb[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/VB/bubble.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/CS/bubble.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/VB/bubble.vb" id="Snippet1"::: ]]> @@ -2896,8 +2896,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example demonstrates how to override the method to add child controls to the parent control from a data source. - [!code-csharp[TemplatedDataBoundControl#3](~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs#3)] - [!code-vb[TemplatedDataBoundControl#3](~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb" id="Snippet3"::: ]]> @@ -2942,8 +2942,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[System.Web.UI.Control_Context_OnInit_ResolveUrl#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/CS/control1.cs#3)] - [!code-vb[System.Web.UI.Control_Context_OnInit_ResolveUrl#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/VB/control1.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/CS/control1.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/VB/control1.vb" id="Snippet3"::: ]]> @@ -2987,8 +2987,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[Control_OnUnload#3](~/snippets/csharp/VS_Snippets_WebNet/Control_OnUnload/CS/control_onunload.cs#3)] - [!code-vb[Control_OnUnload#3](~/snippets/visualbasic/VS_Snippets_WebNet/Control_OnUnload/VB/control_onunload.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_OnUnload/CS/control_onunload.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_OnUnload/VB/control_onunload.vb" id="Snippet3"::: ]]> @@ -3033,8 +3033,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[Control_Sample_1_snipper#1](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1_snipper/CS/control_sample_1.cs#1)] - [!code-vb[Control_Sample_1_snipper#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1_snipper/VB/control_sample_1.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1_snipper/CS/control_sample_1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1_snipper/VB/control_sample_1.vb" id="Snippet1"::: ]]> @@ -3078,8 +3078,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples - [!code-csharp[Control_OnUnload#2](~/snippets/csharp/VS_Snippets_WebNet/Control_OnUnload/CS/control_onunload.cs#2)] - [!code-vb[Control_OnUnload#2](~/snippets/visualbasic/VS_Snippets_WebNet/Control_OnUnload/VB/control_onunload.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_OnUnload/CS/control_onunload.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_OnUnload/VB/control_onunload.vb" id="Snippet2"::: ]]> @@ -3169,8 +3169,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method. It uses the property to access the property and determine whether the page that contains this control has just been loaded for the first time or is the result of a postback. - [!code-csharp[Control_Sample#1](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples.cs#1)] - [!code-vb[Control_Sample#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples.vb" id="Snippet1"::: ]]> @@ -3227,8 +3227,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example sets a new object on a page, `myControl1`, to the control specified in a method call. If the call returns a control, the code uses the property to identify the control that contains `myControl1`. If the parent control exists, the string "The parent of the text box is" is concatenated with the property of the parent control and written to the . If no parent control is found, the string "Control not found" is written. - [!code-csharp[System.Web.UI.Page.Parent_FindControl#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/CS/control_parent.cs.aspx#1)] - [!code-vb[System.Web.UI.Page.Parent_FindControl#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/VB/control_parent.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/CS/control_parent.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/VB/control_parent.vb.aspx" id="Snippet1"::: ]]> @@ -3302,8 +3302,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following code example demonstrate how to create a custom class, `ChildControl`, overriding the method to call the method that sends the event to its parent ASP.NET server control. When the user clicks a button in an ASP.NET page that includes an instance of `ChildControl`, it raises the method on the parent control that contains the instance of `ChildControl` and writes the string "The ChildControl class OnClick method is called" to the page. - [!code-csharp[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/CS/bubble.cs#2)] - [!code-vb[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/VB/bubble.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/CS/bubble.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/VB/bubble.vb" id="Snippet2"::: ]]> @@ -3390,8 +3390,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following code example demonstrates overriding the method. The method is used to determine whether the server control has any child controls stored in its object, which is accessible through the property. If returns true and the first server control in the collection is literal text, then the literal text is appended to an HTML string. - [!code-csharp[Classic Control.Render Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Control.Render Example/CS/source.cs#1)] - [!code-vb[Classic Control.Render Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.Render Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Control.Render Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.Render Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3439,8 +3439,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", The overridden method then calls the overridden method. - [!code-csharp[Control_Sample_1#4](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs#4)] - [!code-vb[Control_Sample_1#4](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb" id="Snippet4"::: ]]> @@ -3504,8 +3504,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method in a custom server control. It determines whether the current control has any child controls in its object. If it does, it uses the property to iterate through the collection. As it encounters each child control, it uses the method to render the child control, and all of its child controls, to the containing page. The object that is passed to this method is instantiated by the method. - [!code-csharp[Control_Sample_1#3](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs#3)] - [!code-vb[Control_Sample_1#3](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb" id="Snippet3"::: ]]> @@ -3745,8 +3745,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example creates an Web server control object and uses the method to set the path to the image, which is stored by the property. - [!code-csharp[Control_ResolveUrl#1](~/snippets/csharp/VS_Snippets_WebNet/Control_ResolveUrl/CS/control_resolveurl.cs#1)] - [!code-vb[Control_ResolveUrl#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_ResolveUrl/VB/control_resolveurl.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_ResolveUrl/CS/control_resolveurl.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_ResolveUrl/VB/control_resolveurl.vb" id="Snippet1"::: ]]> @@ -3790,8 +3790,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", The method is overridden to call the method on the to indicate that the custom control uses control state. - [!code-csharp[ControlState#1](~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx#1)] - [!code-vb[ControlState#1](~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx" id="Snippet1"::: ]]> @@ -3841,8 +3841,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method in a custom ASP.NET server control. When this method is invoked, it determines whether the control has any child controls and whether the containing object is the result of a postback. If both are true, it changes the property of a Web server control to read `Custom Control Has Saved State`. It then saves the view state of the control as an array of objects, named `allStates`. - [!code-csharp[Control_StateManagement#2](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#2)] - [!code-vb[Control_StateManagement#2](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet2"::: ]]> @@ -4569,8 +4569,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example uses the property twice. The first time it is used in a method call to obtain the path to the directory in which the control resides. The second time it is in a method call to obtain the list of all the files contained within that directory. - [!code-csharp[Control_TemplateSourceDirectory#2](~/snippets/csharp/VS_Snippets_WebNet/Control_TemplateSourceDirectory/CS/control_templatesourcedirectory.cs#2)] - [!code-vb[Control_TemplateSourceDirectory#2](~/snippets/visualbasic/VS_Snippets_WebNet/Control_TemplateSourceDirectory/VB/control_templatesourcedirectory.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_TemplateSourceDirectory/CS/control_templatesourcedirectory.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_TemplateSourceDirectory/VB/control_templatesourcedirectory.vb" id="Snippet2"::: ]]> @@ -4617,8 +4617,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example overrides the method in a custom ASP.NET server control. It begins by calling the base method and then uses the method to delete all the child controls and the method to delete any saved view-state settings for those child controls. Finally, the property is set to `true`. The control then uses the property to determine whether view-state change tracking is enabled for the control. If it is not enabled, the method is called. - [!code-csharp[Control_StateManagement#5](~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#5)] - [!code-vb[Control_StateManagement#5](~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb" id="Snippet5"::: ]]> @@ -4791,8 +4791,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example demonstrates implementing a `Text` property that stores and retrieves its value from its control's property. - [!code-csharp[SysWebUIControlViewState#2](~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs#2)] - [!code-vb[SysWebUIControlViewState#2](~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb" id="Snippet2"::: ]]> @@ -4846,8 +4846,8 @@ HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product", ## Examples The following example demonstrates how to override the property to return `true`. - [!code-csharp[System.Web.UI.Control_ViewStateIgnoresCase#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/cs/controlsample_7.cs#2)] - [!code-vb[System.Web.UI.Control_ViewStateIgnoresCase#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/VB/controlsample_7.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/cs/controlsample_7.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/VB/controlsample_7.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/ControlCollection.xml b/xml/System.Web.UI/ControlCollection.xml index 773b4ef19eb..042355c3f69 100644 --- a/xml/System.Web.UI/ControlCollection.xml +++ b/xml/System.Web.UI/ControlCollection.xml @@ -37,8 +37,8 @@ ## Examples The following code example overrides the method to create two controls, both instances of the custom class named `ChildControl`, which has a string property named `Message`. When created, the two controls are added to the . The method is called on each of these controls to add them to the class that contains this version of . The property is set to `true` so that these controls will not be created again unnecessarily. - [!code-csharp[Control_Sample_1#1](~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs#1)] - [!code-vb[Control_Sample_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb" id="Snippet1"::: ]]> @@ -74,8 +74,8 @@ ## Examples The following code example is a custom class that overrides the constructor to write messages (which include the name of the property) to the trace log when an instance of the collection is created. You must enable tracing for the page or application for this example to work. - [!code-csharp[System.Web.UI.ControlCollection_CTor_Owner#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs#1)] - [!code-vb[System.Web.UI.ControlCollection_CTor_Owner#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb" id="Snippet1"::: ]]> @@ -120,8 +120,8 @@ ## Examples The following code example uses the method to add a series of template items, the number of which are taken from the server control's view state, to a custom templated control. - [!code-csharp[TemplatedDataBoundControl#2](~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs#2)] - [!code-vb[TemplatedDataBoundControl#2](~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb" id="Snippet2"::: ]]> @@ -167,8 +167,8 @@ ## Examples The following code example uses the method to create a new named `ChildControl2` and add it to the `myButton` control's collection at the index location of 1. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#1)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet1"::: ]]> @@ -210,8 +210,8 @@ ## Examples The following code example demonstrates overriding the method, and using the method to delete all child controls previously in the object. In this case, you must do this so that outdated objects in your control's are not displayed inappropriately. - [!code-csharp[TemplatedDataBoundControl#2](~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs#2)] - [!code-vb[TemplatedDataBoundControl#2](~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl/CS/templatedataboundcontrol.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl/VB/templatedataboundcontrol.vb" id="Snippet2"::: ]]> @@ -247,8 +247,8 @@ @@ -330,8 +330,8 @@ ## Examples The following code example demonstrates how to use the property to iterate through a control's object. The use of the property verifies that the control has child controls. If returns `false`, the remaining code does not run. - [!code-csharp[Classic Control.HasControls Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic Control.HasControls Example/CS/source.cs#1)] - [!code-vb[Classic Control.HasControls Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.HasControls Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Control.HasControls Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.HasControls Example/VB/source.vb" id="Snippet1"::: ]]> @@ -370,8 +370,8 @@ ## Examples The following code example creates a method that enumerates through the collection of a control, `myButton`. When the enumerator is created, the property is checked to see if the operation is thread safe, and if it is not, the property is used to obtain an object to make the operation thread safe. When the enumeration is completed, the value of the property is written as the property of a control on the containing page. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#2)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet2"::: ]]> @@ -414,8 +414,8 @@ ## Examples The following code example uses the method to write the index location of a control, `myLiteralControl`, in the collection of a control named `myButton`. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#1)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet1"::: ]]> @@ -449,8 +449,8 @@ ## Examples The following code example creates a method that enumerates through the collection of a control, `myButton`. When the enumerator is created, the property is checked to see if the operation is thread safe, and if it is not, the property is used to obtain an object to make the operation thread safe. When the enumeration is complete, the value of the property is written as the property of a control on the containing page. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#2)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet2"::: ]]> @@ -486,8 +486,8 @@ ## Examples The following code example creates a method that enumerates through the collection of a control, `myButton`. When the enumerator is created, the property is checked to see if the operation is thread safe, and if it is not, the property is used to obtain an object to make the operation thread safe. When the enumeration is complete, the value of the property is written as the property of a control on the containing page. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#2)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet2"::: ]]> @@ -565,8 +565,8 @@ ## Examples The following code example is a custom class that overrides the method to write messages (which include the name of the property) to the trace log when an instance of the collection is created. You must enable tracing for the page or application for this example to work. - [!code-csharp[System.Web.UI.ControlCollection_CTor_Owner#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs#1)] - [!code-vb[System.Web.UI.ControlCollection_CTor_Owner#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb" id="Snippet1"::: ]]> @@ -607,8 +607,8 @@ ## Examples The following code example uses the method to delete a child control from the `myButton` server control. First the code uses the method to determine whether the `myChildControl` is contained in the object, and, if it is, removes it. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#4)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet4"::: ]]> @@ -650,8 +650,8 @@ ## Examples The following code example uses the method to delete a child control from the `myButton` server control. The method call first specifies an index location of 1 from which the control is deleted. The example then writes to the containing page a text message saying that the control at that location has been deleted from the collection. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#5)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet5"::: ]]> @@ -689,8 +689,8 @@ ## Examples The following code example creates a method that enumerates through the collection of a control, `myButton`. When the enumerator is created, the property is checked to see if the operation is thread safe, and if it is not, the property is used to obtain an object to make the operation thread safe. When the enumeration is complete, the value of the property is written as the property of a control on the containing page. - [!code-csharp[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx#2)] - [!code-vb[System.Web.UI.ControlCollection_NewSamples#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/CS/controlcollection1_cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_NewSamples/VB/controlcollection1_vb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/ImageClickEventArgs.xml b/xml/System.Web.UI/ImageClickEventArgs.xml index 9bb506d9ba9..ee388cf390b 100644 --- a/xml/System.Web.UI/ImageClickEventArgs.xml +++ b/xml/System.Web.UI/ImageClickEventArgs.xml @@ -33,8 +33,8 @@ ## Examples The following code example demonstrates an ASP.NET page that uses the information provided by this class to display the coordinates of a user's click on an image. - [!code-csharp[SystemWebUI.ImageClickEventArgs Sample#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/CS/imageclickeventargscs.aspx#1)] - [!code-vb[SystemWebUI.ImageClickEventArgs Sample#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/VB/imageclickeventargsvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/CS/imageclickeventargscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/VB/imageclickeventargsvb.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI/ImageClickEventHandler.xml b/xml/System.Web.UI/ImageClickEventHandler.xml index a1f30f478ea..03c5ef69e8a 100644 --- a/xml/System.Web.UI/ImageClickEventHandler.xml +++ b/xml/System.Web.UI/ImageClickEventHandler.xml @@ -38,8 +38,8 @@ ## Examples - [!code-csharp[SystemWebUI.ImageClickEventArgs Sample#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/CS/imageclickeventargscs.aspx#1)] - [!code-vb[SystemWebUI.ImageClickEventArgs Sample#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/VB/imageclickeventargsvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/CS/imageclickeventargscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI.ImageClickEventArgs Sample/VB/imageclickeventargsvb.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI/LiteralControl.xml b/xml/System.Web.UI/LiteralControl.xml index aa26f348367..ac4c696e14e 100644 --- a/xml/System.Web.UI/LiteralControl.xml +++ b/xml/System.Web.UI/LiteralControl.xml @@ -47,8 +47,8 @@ ## Examples The following code example demonstrates how to use the overloaded constructor when overriding the method. The code adds two new objects and a Web server control to the current server control's property. - [!code-csharp[SystemWebUILiteralControl#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUILiteralControl/CS/controlcreatechildcontrols.cs#1)] - [!code-vb[SystemWebUILiteralControl#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUILiteralControl/VB/controlcreatechildcontrols.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUILiteralControl/CS/controlcreatechildcontrols.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUILiteralControl/VB/controlcreatechildcontrols.vb" id="Snippet1"::: ]]> @@ -86,8 +86,8 @@ ## Examples The following code example creates a class, `CustLiteralControlClass`, that extends the class. It creates an instance of the class named `myLiteralControlClass1` by using the constructor that does not specify the text of the object. After the object is created, the property is used to set the text that it contains. - [!code-csharp[LiteralControlSample#4](~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs.aspx#4)] - [!code-vb[LiteralControlSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb.aspx" id="Snippet4"::: ]]> @@ -119,8 +119,8 @@ ## Examples The following code example creates two instances of the class using the constructor. The two instances render opening and closing tags for an H3 HTML element, and include the text to display within the H3 tags. - [!code-csharp[SystemWebUILiteralControl#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUILiteralControl/CS/controlcreatechildcontrols.cs#1)] - [!code-vb[SystemWebUILiteralControl#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUILiteralControl/VB/controlcreatechildcontrols.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUILiteralControl/CS/controlcreatechildcontrols.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUILiteralControl/VB/controlcreatechildcontrols.vb" id="Snippet1"::: ]]> @@ -159,8 +159,8 @@ ## Examples The following code example overrides the method to create an instance of the class rather than an instance of the class. - [!code-csharp[LiteralControlSample#2](~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs#2)] - [!code-vb[LiteralControlSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb" id="Snippet2"::: ]]> @@ -247,8 +247,8 @@ ## Examples The following code example creates a class, `CustLiteralControlClass`, that extends the class. It creates an instance of the class named `myLiteralControlClass1` by using the constructor that does not specify the text of the object. After the object is created, the property is used to set the text that it contains. - [!code-csharp[LiteralControlSample#4](~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs.aspx#4)] - [!code-vb[LiteralControlSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/LiteralControlSample/CS/customliteralcontrol.cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/LiteralControlSample/VB/customliteralcontrol.vb.aspx" id="Snippet4"::: ]]> diff --git a/xml/System.Web.UI/Page.xml b/xml/System.Web.UI/Page.xml index 1417b57b484..408417a439a 100644 --- a/xml/System.Web.UI/Page.xml +++ b/xml/System.Web.UI/Page.xml @@ -75,8 +75,8 @@ The following code example demonstrates how the class is used in the code-behind page model. Note that the code-behind source file declares a partial class that inherits from a base page class. The base page class can be , or it can be another class that derives from . Furthermore, note that the partial class allows the code-behind file to use controls defined on the page without the need to define them as field members. - [!code-csharp[System.Web.UI.Page_Overview#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_Overview/cs/pageexample.aspx.cs#2)] - [!code-vb[System.Web.UI.Page_Overview#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_Overview/vb/pageexample.aspx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_Overview/cs/pageexample.aspx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_Overview/vb/pageexample.aspx.vb" id="Snippet2"::: The following code example shows the .aspx file that corresponds to the preceding code-behind source file. @@ -380,8 +380,8 @@ @@ -683,8 +683,8 @@ [!code-aspx-csharp[System.Web.UI.Page.AsyncTimeout#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.Page.AsyncTimeout#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.Page.AsyncTimeout#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs#2)] - [!code-vb[System.Web.UI.Page.AsyncTimeout#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb" id="Snippet2"::: ]]> @@ -819,8 +819,8 @@ ## Examples The following code example inserts the sum of two integers into the object using the property. It then retrieves the value using the method and writes it to a Web server control. - [!code-csharp[System.Web.Page.Cache_Replacement#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Page.Cache_Replacement/CS/pagecachecs.aspx#1)] - [!code-vb[System.Web.Page.Cache_Replacement#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Page.Cache_Replacement/VB/pagecachevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Page.Cache_Replacement/CS/pagecachecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Page.Cache_Replacement/VB/pagecachevb.aspx" id="Snippet1"::: ]]> @@ -1112,8 +1112,8 @@ ## Examples The following code example uses the property to access the and methods and the property. The example creates three custom exceptions using the method and uses the property to load these exceptions to an array. It then writes the array to the containing page and uses the method to clear all the errors from the property. - [!code-csharp[System.Web.UI.Page.Context#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Context/CS/pagecontextcs.aspx#1)] - [!code-vb[System.Web.UI.Page.Context#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Context/VB/pagecontextvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Context/CS/pagecontextcs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Context/VB/pagecontextvb.aspx" id="Snippet1"::: ]]> @@ -1165,8 +1165,8 @@ ## Examples The following code example uses the method to create an instance of a custom object named `MyHtmlTextWriter`. The method is overridden in the `MyPage` class, which is derived from , so that `MyHtmlTextWriter` renders ASP.NET server controls when the page is requested. Note that this example will prevent adapter behavior. - [!code-csharp[Page_CreateHtmlTextWriter#2](~/snippets/csharp/VS_Snippets_WebNet/Page_CreateHtmlTextWriter/CS/page_createhtmltextwriter.cs#2)] - [!code-vb[Page_CreateHtmlTextWriter#2](~/snippets/visualbasic/VS_Snippets_WebNet/Page_CreateHtmlTextWriter/VB/page_createhtmltextwriter.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_CreateHtmlTextWriter/CS/page_createhtmltextwriter.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_CreateHtmlTextWriter/VB/page_createhtmltextwriter.vb" id="Snippet2"::: ]]> @@ -1487,8 +1487,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Page_EnableViewState_ReSubmit_1#1](~/snippets/csharp/VS_Snippets_WebNet/Page_EnableViewState_ReSubmit_1/CS/page_enableviewstate.cs#1)] - [!code-vb[Page_EnableViewState_ReSubmit_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_EnableViewState_ReSubmit_1/VB/page_enableviewstate.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_EnableViewState_ReSubmit_1/CS/page_enableviewstate.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_EnableViewState_ReSubmit_1/VB/page_enableviewstate.vb" id="Snippet1"::: ]]> @@ -1600,8 +1600,8 @@ @@ -1645,8 +1645,8 @@ [!code-aspx-csharp[System.Web.UI.Page.AsyncTimeout#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.Page.AsyncTimeout#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.Page.AsyncTimeout#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs#2)] - [!code-vb[System.Web.UI.Page.AsyncTimeout#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb" id="Snippet2"::: ]]> @@ -2102,8 +2102,8 @@ ## Examples The following code example uses the method to return the default validation group. - [!code-csharp[PageGetValidators#1](~/snippets/csharp/VS_Snippets_WebNet/PageGetValidators/CS/pagegetvalidatorscs.aspx#1)] - [!code-vb[PageGetValidators#1](~/snippets/visualbasic/VS_Snippets_WebNet/PageGetValidators/VB/pagegetvalidatorsvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PageGetValidators/CS/pagegetvalidatorscs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PageGetValidators/VB/pagegetvalidatorsvb.aspx" id="Snippet1"::: ]]> @@ -2749,8 +2749,8 @@ The page markup (not shown) contains controls that display asterisks if no entry is made for a required input field. Calling causes the asterisks to be displayed immediately when the page is rendered, instead of waiting until the user clicks the Submit button. After a postback, you do not have to call , because that method is called as part of the life cycle. - [!code-csharp[System.Web.UI.Page.Validate#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Validate/CS/validate.cs.aspx#1)] - [!code-vb[System.Web.UI.Page.Validate#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Validate/VB/validate.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Validate/CS/validate.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Validate/VB/validate.vb.aspx" id="Snippet1"::: ]]> @@ -2919,8 +2919,8 @@ ## Examples The following code example demonstrates using the property to set up a conditional statement. If the property returns `true`, the `Text` property of the `lblOutput` control is set to "Page is valid!" Otherwise, it is set to "Some of the required fields are empty." - [!code-csharp[System.Web.UI.Page.Validate#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Validate/CS/validate.cs.aspx#2)] - [!code-vb[System.Web.UI.Page.Validate#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Validate/VB/validate.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Validate/CS/validate.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Validate/VB/validate.vb.aspx" id="Snippet2"::: ]]> @@ -3191,8 +3191,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following example uses the method to obtain the physical path of a subfolder. It then appends the file name that is read from the property of a control. The result is the absolute physical path to that file. - [!code-csharp[Page_MapPath_ResponseEncoding#1](~/snippets/csharp/VS_Snippets_WebNet/Page_MapPath_ResponseEncoding/CS/page_mappath_responseencoding.cs.aspx#1)] - [!code-vb[Page_MapPath_ResponseEncoding#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_MapPath_ResponseEncoding/VB/page_mappath_responseencoding.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_MapPath_ResponseEncoding/CS/page_mappath_responseencoding.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_MapPath_ResponseEncoding/VB/page_mappath_responseencoding.vb.aspx" id="Snippet1"::: ]]> @@ -4176,8 +4176,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following example uses the method to notify ASP.NET that a post-back event is raised when a custom `userButton` server control is clicked. - [!code-csharp[Page_RaisePostBackEvent#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RaisePostBackEvent/CS/page_raisepostbackevent.cs.aspx#1)] - [!code-vb[Page_RaisePostBackEvent#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RaisePostBackEvent/VB/page_raisepostbackevent.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_RaisePostBackEvent/CS/page_raisepostbackevent.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_RaisePostBackEvent/VB/page_raisepostbackevent.vb.aspx" id="Snippet1"::: ]]> @@ -4271,8 +4271,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca [!code-aspx-csharp[System.Web.UI.Page.AsyncTimeout#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.Page.AsyncTimeout#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.Page.AsyncTimeout#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs#2)] - [!code-vb[System.Web.UI.Page.AsyncTimeout#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/CS/page_asynctask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.AsyncTimeout/vb/page_asynctask.vb" id="Snippet2"::: ]]> @@ -4472,8 +4472,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following code example shows a custom server control calling the method. - [!code-csharp[ControlState#1](~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx#1)] - [!code-vb[ControlState#1](~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx" id="Snippet1"::: ]]> @@ -4527,8 +4527,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Page_RegisterRequiresPostBack#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterRequiresPostBack/CS/page_registerrequirespostback.cs.aspx#1)] - [!code-vb[Page_RegisterRequiresPostBack#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterRequiresPostBack/VB/page_registerrequirespostback.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterRequiresPostBack/CS/page_registerrequirespostback.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterRequiresPostBack/VB/page_registerrequirespostback.vb.aspx" id="Snippet1"::: ]]> @@ -4579,8 +4579,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following code example uses the method to register a Web server control as requiring an event to be raised. After you have registered the first control, you can cause the second control declared in the code to post the results of the first button's click event to the page. - [!code-csharp[Page_RaisePostBackEvent#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RaisePostBackEvent/CS/page_raisepostbackevent.cs.aspx#1)] - [!code-vb[Page_RaisePostBackEvent#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RaisePostBackEvent/VB/page_raisepostbackevent.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_RaisePostBackEvent/CS/page_raisepostbackevent.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_RaisePostBackEvent/VB/page_raisepostbackevent.vb.aspx" id="Snippet1"::: ]]> @@ -4732,8 +4732,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples - [!code-csharp[Page_RegisterViewStateHandler#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterViewStateHandler/CS/page_registerviewstatehandler.cs#1)] - [!code-vb[Page_RegisterViewStateHandler#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterViewStateHandler/VB/page_registerviewstatehandler.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterViewStateHandler/CS/page_registerviewstatehandler.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterViewStateHandler/VB/page_registerviewstatehandler.vb" id="Snippet1"::: ]]> @@ -4819,8 +4819,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following example demonstrates how to obtain the collection from the object and write it to an ASP.NET page. - [!code-csharp[Classic HttpRequest.Headers Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Headers Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/VB/source.vb" id="Snippet1"::: ]]> @@ -4906,8 +4906,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca ## Examples The following code example demonstrates creating a cookie and adding it to the page's HTTP output by using the object. - [!code-csharp[Classic HttpResponse.Cookies Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.Cookies Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/VB/source.vb" id="Snippet1"::: ]]> @@ -5155,8 +5155,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example demonstrates how to access error information from the server by using the `Server` object. In particular, the example gets the requested URL from the `Request` object, the most recent error from the `Server` object (using the method) and converts them both to strings that can be displayed by the client. Once the `message` variable is written to the client, the error is deleted using the method. - [!code-csharp[System.Web.UI.Page_Error method#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_Error method/CS/sourcecs.aspx#1)] - [!code-vb[System.Web.UI.Page_Error method#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_Error method/VB/sourcevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_Error method/CS/sourcecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_Error method/VB/sourcevb.aspx" id="Snippet1"::: ]]> @@ -5204,8 +5204,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example creates a `GetStyle` function that retrieves a key stored in the session state of the Web Forms page and converts its value to a string. - [!code-csharp[Page.Session_Samples1#1](~/snippets/csharp/VS_Snippets_WebNet/Page.Session_Samples1/CS/sessioncs.aspx#1)] - [!code-vb[Page.Session_Samples1#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page.Session_Samples1/VB/sessionvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page.Session_Samples1/CS/sessioncs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page.Session_Samples1/VB/sessionvb.aspx" id="Snippet1"::: ]]> @@ -5540,8 +5540,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example sets the property to a name passed in the query string. - [!code-csharp[PageTheme#1](~/snippets/csharp/VS_Snippets_WebNet/PageTheme/CS/pagethemecs.aspx#1)] - [!code-vb[PageTheme#1](~/snippets/visualbasic/VS_Snippets_WebNet/PageTheme/VB/pagethemevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PageTheme/CS/pagethemecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PageTheme/VB/pagethemevb.aspx" id="Snippet1"::: ]]> @@ -5643,8 +5643,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example demonstrates accessing the property and the method through the property. This code calls the method only when tracing is enabled for the object. If it is not enabled, this code will not run, which can help reduce overhead for your application. - [!code-csharp[System.Web.UI.Page.Trace#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Trace/CS/trace1cs.aspx#2)] - [!code-vb[System.Web.UI.Page.Trace#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Trace/VB/trace1vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Trace/CS/trace1cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Trace/VB/trace1vb.aspx" id="Snippet2"::: ]]> @@ -6206,8 +6206,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example uses the property to access authentication and identity information for the current user. If the user is not authenticated, it redirects them to a login page. - [!code-csharp[Page_User#1](~/snippets/csharp/VS_Snippets_WebNet/Page_User/CS/page_user.cs.aspx#1)] - [!code-vb[Page_User#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_User/VB/page_user.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_User/CS/page_user.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_User/VB/page_user.vb.aspx" id="Snippet1"::: ]]> @@ -6463,8 +6463,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following code example overrides the method of a custom server control. When this control writes its content to a page, it uses the method to make sure that the control appears between the opening and closing tags of an control. - [!code-csharp[System.Web.UI.Page_VerifyRenderingInServerForm#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs#3)] - [!code-vb[System.Web.UI.Page_VerifyRenderingInServerForm#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/vb/testlinkbutton.vb#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/vb/testlinkbutton.vb" id="Snippet3"::: ]]> @@ -6636,8 +6636,8 @@ int year = Convert.ToInt32(Page.RouteData.Values["year"]) ## Examples The following example sets the property to `false` to hide the rendered content of a page. When this page is first requested, a data source is populated and displayed in the page. When a user clicks the button, the `HideButton_Click` event handler hides the entire rendered content of the page. - [!code-csharp[Page_Visible#1](~/snippets/csharp/VS_Snippets_WebNet/Page_Visible/CS/page_visible.cs.aspx#1)] - [!code-vb[Page_Visible#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_Visible/VB/page_visible.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Page_Visible/CS/page_visible.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Page_Visible/VB/page_visible.vb.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI/PageAsyncTask.xml b/xml/System.Web.UI/PageAsyncTask.xml index 375a4171e63..18699e913ab 100644 --- a/xml/System.Web.UI/PageAsyncTask.xml +++ b/xml/System.Web.UI/PageAsyncTask.xml @@ -52,8 +52,8 @@ [!code-aspx-csharp[System.Web.UI.PageAsyncTask#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.PageAsyncTask#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.PageAsyncTask#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs#2)] - [!code-vb[System.Web.UI.PageAsyncTask#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb" id="Snippet2"::: ]]> @@ -197,8 +197,8 @@ ## Examples The following code example creates three asynchronous tasks that are processed in parallel to each other. This example is part of a larger example found in the class overview. - [!code-csharp[System.Web.UI.PageAsyncTask#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#3)] - [!code-vb[System.Web.UI.PageAsyncTask#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx" id="Snippet3"::: ]]> @@ -244,8 +244,8 @@ [!code-aspx-csharp[System.Web.UI.PageAsyncTask#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.PageAsyncTask#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.PageAsyncTask#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs#2)] - [!code-vb[System.Web.UI.PageAsyncTask#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb" id="Snippet2"::: ]]> @@ -290,8 +290,8 @@ [!code-aspx-csharp[System.Web.UI.PageAsyncTask#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.PageAsyncTask#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.PageAsyncTask#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs#2)] - [!code-vb[System.Web.UI.PageAsyncTask#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb" id="Snippet2"::: ]]> @@ -334,8 +334,8 @@ ## Examples The following code example defines three asynchronous tasks that are each set to be processed in parallel. This example is part of a larger example found in the class overview. - [!code-csharp[System.Web.UI.PageAsyncTask#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#3)] - [!code-vb[System.Web.UI.PageAsyncTask#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx" id="Snippet3"::: ]]> @@ -377,8 +377,8 @@ ## Examples The following code example creates three asynchronous tasks and gives them unique values for their properties. This example is part of a larger example found in the class overview. - [!code-csharp[System.Web.UI.PageAsyncTask#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#3)] - [!code-vb[System.Web.UI.PageAsyncTask#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx" id="Snippet3"::: ]]> @@ -423,8 +423,8 @@ [!code-aspx-csharp[System.Web.UI.PageAsyncTask#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/page_asynctask.aspx#1)] [!code-aspx-vb[System.Web.UI.PageAsyncTask#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/page_asynctask.aspx#1)] - [!code-csharp[System.Web.UI.PageAsyncTask#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs#2)] - [!code-vb[System.Web.UI.PageAsyncTask#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/CS/App_Code/SlowTask.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.PageAsyncTask/VB/App_Code/SlowTask.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/StateBag.xml b/xml/System.Web.UI/StateBag.xml index 69425d50745..bb2a6c1a1e8 100644 --- a/xml/System.Web.UI/StateBag.xml +++ b/xml/System.Web.UI/StateBag.xml @@ -45,8 +45,8 @@ ## Examples The following code example demonstrates a composite `Label` control that has `Text` and `FontSize` properties. These properties are saved to and retrieved from view state when the method is called on the control. - [!code-csharp[SysWebUIControlViewState#1](~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs#1)] - [!code-vb[SysWebUIControlViewState#1](~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb" id="Snippet1"::: ]]> @@ -150,8 +150,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[Web.UI.StateBag#3](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx#3)] - [!code-vb[Web.UI.StateBag#3](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx" id="Snippet3"::: ]]> @@ -196,8 +196,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[StateBag_IStateManager_Sample1#4](~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs#4)] - [!code-vb[StateBag_IStateManager_Sample1#4](~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb" id="Snippet4"::: ]]> @@ -234,8 +234,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[Web.UI.StateBag#2](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx#2)] - [!code-vb[Web.UI.StateBag#2](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx" id="Snippet2"::: ]]> @@ -272,8 +272,8 @@ ## Examples The following example demonstrates how to use the method. - [!code-csharp[StateItem_Samples1#3](~/snippets/csharp/VS_Snippets_WebNet/StateItem_Samples1/CS/stateitem_samples.cs.aspx#3)] - [!code-vb[StateItem_Samples1#3](~/snippets/visualbasic/VS_Snippets_WebNet/StateItem_Samples1/VB/stateitem_samples.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/StateItem_Samples1/CS/stateitem_samples.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/StateItem_Samples1/VB/stateitem_samples.vb.aspx" id="Snippet3"::: ]]> @@ -316,8 +316,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[StateBag_IStateManager_Sample1#4](~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs#4)] - [!code-vb[StateBag_IStateManager_Sample1#4](~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb" id="Snippet4"::: ]]> @@ -361,8 +361,8 @@ ## Examples The following code example demonstrates a property that saves its name and value as a key/value pair to the property. The property is an instance of the class. - [!code-csharp[SysWebUIControlViewState#2](~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs#2)] - [!code-vb[SysWebUIControlViewState#2](~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb" id="Snippet2"::: ]]> @@ -410,8 +410,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[Web.UI.StateBag#2](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx#2)] - [!code-vb[Web.UI.StateBag#2](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx" id="Snippet2"::: ]]> @@ -448,8 +448,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[Web.UI.StateBag#3](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx#3)] - [!code-vb[Web.UI.StateBag#3](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx" id="Snippet3"::: ]]> @@ -1103,8 +1103,8 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example demonstrates using the property. - [!code-csharp[Web.UI.StateBag#2](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx#2)] - [!code-vb[Web.UI.StateBag#2](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/TemplateContainerAttribute.xml b/xml/System.Web.UI/TemplateContainerAttribute.xml index b256c42c7ed..2c2e0c8a1ea 100644 --- a/xml/System.Web.UI/TemplateContainerAttribute.xml +++ b/xml/System.Web.UI/TemplateContainerAttribute.xml @@ -36,8 +36,8 @@ ## Examples The following code example demonstrates how to create a templated control named `TemplatedFirstControl` and associate it with a container named `FirstTemplateContainer`. This allows the creation of custom controls that display the server time when the template is not specified and the template's content when the template is specified. - [!code-csharp[SystemWebUI_TemplateContainerAttribute#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs#1)] - [!code-vb[SystemWebUI_TemplateContainerAttribute#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb" id="Snippet1"::: The following Web form demonstrates how to use the custom control created in the preceding code example. Two instances of the `TemplatedFirstControl` are placed on the page: @@ -95,8 +95,8 @@ ## Examples The following code example shows how to create a templated control named `TemplatedFirstControl` and associate it with a container named `FirstTemplateContainer`. This allows the creation of custom controls that display the server time when the template is not specified and the template's content when the template is specified. The class is used for the `FirstTemplate` property. - [!code-csharp[SystemWebUI_TemplateContainerAttribute#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs#1)] - [!code-vb[SystemWebUI_TemplateContainerAttribute#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb" id="Snippet1"::: ]]> @@ -177,8 +177,8 @@ This code example is part of a larger example provided for the class. - [!code-csharp[SystemWebUI_TemplateContainerAttribute#3](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.aspx#3)] - [!code-vb[SystemWebUI_TemplateContainerAttribute#3](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.aspx" id="Snippet3"::: ]]> @@ -220,8 +220,8 @@ ## Examples The following code example demonstrates how to create a templated control named `TemplatedFirstControl` and associate it with a container named `FirstTemplateContainer`. This allows the creation of custom controls that display the server time when the template is not specified and the template's content when the template is specified. The class is used for the `FirstTemplate` property and for specifying the property as `FirstTemplateContainer`. - [!code-csharp[SystemWebUI_TemplateContainerAttribute#1](~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs#1)] - [!code-vb[SystemWebUI_TemplateContainerAttribute#1](~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/CS/templatecontainerattribute.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_TemplateContainerAttribute/VB/templatecontainerattribute.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI/TemplateControl.xml b/xml/System.Web.UI/TemplateControl.xml index 0794f883159..a0b07d5920c 100644 --- a/xml/System.Web.UI/TemplateControl.xml +++ b/xml/System.Web.UI/TemplateControl.xml @@ -50,8 +50,8 @@ ## Examples The following code example demonstrates how to derive a control named `MyControl` from the class and override the method. When `MyControl` is initialized, the overridden method is called. - [!code-csharp[TemplateControl_Sample1#1](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs#1)] - [!code-vb[TemplateControl_Sample1#1](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb" id="Snippet1"::: ]]> @@ -110,8 +110,8 @@ ## Examples The following code example demonstrates how to register a custom event handler for the event. Because is an abstract class, this code example uses the class, which is derived from the class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended. - [!code-csharp[TemplateControl_OnCommitTransaction#1](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#1)] - [!code-vb[TemplateControl_OnCommitTransaction#1](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx" id="Snippet1"::: ]]> @@ -225,8 +225,8 @@ ## Examples The following code example demonstrates how to register a custom event handler for the event. Because is an abstract class, this code example uses the class, which is derived from the class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended. - [!code-csharp[TemplateControl_OnCommitTransaction#2](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#2)] - [!code-vb[TemplateControl_OnCommitTransaction#2](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx" id="Snippet2"::: ]]> @@ -269,8 +269,8 @@ For the full definition of the `MyControl` class, see . - [!code-csharp[TemplateControl_Sample1#2](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs#2)] - [!code-vb[TemplateControl_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb" id="Snippet2"::: ]]> @@ -762,8 +762,8 @@ For the definition of the `MyControl` class that is used in this code example, see . - [!code-csharp[TemplateControl_Sample1#3](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/TempControl_Samples1.aspx#3)] - [!code-vb[TemplateControl_Sample1#3](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/TempControl_Samples1.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.aspx" id="Snippet3"::: ]]> @@ -853,8 +853,8 @@ ## Examples The following code example demonstrates how to use the method to add a user control as an alternating item to a Web server control named `DataList1`. The user control implements the interface and is contained in a file named Newtemplate.ascx. - [!code-csharp[System.Web.UI.TemplateControl_LoadTemplate#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/CS/loadtemplatecs.aspx#1)] - [!code-vb[System.Web.UI.TemplateControl_LoadTemplate#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/VB/loadtemplatevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/CS/loadtemplatecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/VB/loadtemplatevb.aspx" id="Snippet1"::: ]]> @@ -890,8 +890,8 @@ ## Examples The following code example demonstrates how to use the and methods. Because is an abstract class, this code example uses the class, which is derived from the class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended. - [!code-csharp[TemplateControl_OnCommitTransaction#3](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#3)] - [!code-vb[TemplateControl_OnCommitTransaction#3](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx" id="Snippet3"::: ]]> @@ -932,8 +932,8 @@ ## Examples The following code example demonstrates how to use the and methods. Because is an abstract class, this code example uses the class, which is derived from the class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended. - [!code-csharp[TemplateControl_OnCommitTransaction#2](~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#2)] - [!code-vb[TemplateControl_OnCommitTransaction#2](~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web.UI/TemplateInstanceAttribute.xml b/xml/System.Web.UI/TemplateInstanceAttribute.xml index 4400da47f85..fd5de3c98c1 100644 --- a/xml/System.Web.UI/TemplateInstanceAttribute.xml +++ b/xml/System.Web.UI/TemplateInstanceAttribute.xml @@ -35,8 +35,8 @@ ## Examples The following code example demonstrates how to use the enumeration and the class. A custom control named `MyLoginViewA` overrides the property and uses the class to specify that only one instance of the property is created. - [!code-csharp[System.Web.UI.TemplateInstanceAttribute#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.cs#1)] - [!code-vb[System.Web.UI.TemplateInstanceAttribute#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.vb" id="Snippet1"::: The following code example is an ASPX file that uses the `MyLoginViewA` control and demonstrates how to access properties of the class. @@ -195,8 +195,8 @@ For the definition of `MyLoginViewA` control, see . - [!code-csharp[System.Web.UI.TemplateInstanceAttribute#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.aspx#3)] - [!code-vb[System.Web.UI.TemplateInstanceAttribute#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.aspx" id="Snippet3"::: ]]> @@ -237,8 +237,8 @@ For the definition of the `MyLoginViewA` control, see . - [!code-csharp[System.Web.UI.TemplateInstanceAttribute#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.aspx#3)] - [!code-vb[System.Web.UI.TemplateInstanceAttribute#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/cs/templateinstanceattribute.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateInstanceAttribute/vb/templateinstanceattribute.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Web.UI/UserControl.xml b/xml/System.Web.UI/UserControl.xml index 530611c1f09..284d8942c63 100644 --- a/xml/System.Web.UI/UserControl.xml +++ b/xml/System.Web.UI/UserControl.xml @@ -109,8 +109,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Sys.Web.UI.TemplateControl_UserControl#2](~/snippets/csharp/VS_Snippets_WebNet/Sys.Web.UI.TemplateControl_UserControl/CS/simplecontrol.cs#2)] - [!code-vb[Sys.Web.UI.TemplateControl_UserControl#2](~/snippets/visualbasic/VS_Snippets_WebNet/Sys.Web.UI.TemplateControl_UserControl/VB/simplecontrol.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Sys.Web.UI.TemplateControl_UserControl/CS/simplecontrol.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Sys.Web.UI.TemplateControl_UserControl/VB/simplecontrol.vb" id="Snippet2"::: The following example is markup contained in an .ascx file. You can use the `SimpleControl` class defined in the previous example as a code-behind class for the markup in this .ascx file. @@ -197,8 +197,8 @@ ## Examples The following example adds two key value pairs to the application state associated with a user control if the user control's property returns `false`. When this condition is met, the code uses the method, through the user control's property, to add the keys and their values. - [!code-csharp[UserControl_Properties#2](~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx#2)] - [!code-vb[UserControl_Properties#2](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx" id="Snippet2"::: ]]> @@ -242,8 +242,8 @@ ## Examples The following code example uses the user control's property to access the `Message` attribute declared in the custom control tag that instantiated the user control on the page that contains it. - [!code-csharp[UserControl_Properties#1](~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx#1)] - [!code-vb[UserControl_Properties#1](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx" id="Snippet1"::: ]]> @@ -294,8 +294,8 @@ > [!IMPORTANT] > This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)). - [!code-csharp[Classic Cache.this Example#2](~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.this Example/CS/source.cs#2)] - [!code-vb[Classic Cache.this Example#2](~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.this Example/VB/source.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic Cache.this Example/CS/source.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic Cache.this Example/VB/source.vb" id="Snippet2"::: ]]> @@ -387,8 +387,8 @@ ## Examples The following example calls the method during the `Page_Init` stage of request processing. This makes the user control available to a RAD designer such as Visual Studio 2005. - [!code-csharp[UserControl1#1](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#1)] - [!code-vb[UserControl1#1](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet1"::: ]]> @@ -431,8 +431,8 @@ ## Examples The following example calls the method during the `Page_Init` stage of request processing. In this case it is initialized from the page itself, but you could initialize it from another control and pass the property value of the containing page as the parameter for this method. - [!code-csharp[UserControl1#1](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#1)] - [!code-vb[UserControl1#1](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet1"::: ]]> @@ -475,8 +475,8 @@ ## Examples The following example adds two key value pairs to the application state associated with a user control if the user control's property returns `false`. When this condition is met, the code uses the method, through the user control's property, to add the keys and their values. - [!code-csharp[UserControl_Properties#2](~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx#2)] - [!code-vb[UserControl_Properties#2](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl_Properties/CS/usercontrol_properties.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_Properties/VB/usercontrol_properties.vb.aspx" id="Snippet2"::: ]]> @@ -519,8 +519,8 @@ ## Examples The following example demonstrates a user control that manages its view state using the and methods. - [!code-csharp[UserControl_StateManagement#1](~/snippets/csharp/VS_Snippets_WebNet/UserControl_StateManagement/CS/usercontrol2.cs#1)] - [!code-vb[UserControl_StateManagement#1](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_StateManagement/VB/usercontrol2.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl_StateManagement/CS/usercontrol2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_StateManagement/VB/usercontrol2.vb" id="Snippet1"::: ]]> @@ -563,8 +563,8 @@ ## Examples The following example calls the method to associate an `actualServerPath` variable with the physical path associated with the user control named `myControl`. - [!code-csharp[UserControl1#3](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#3)] - [!code-vb[UserControl1#3](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet3"::: ]]> @@ -646,8 +646,8 @@ ## Examples The following example uses the property to obtain the physical path of the user control. With an property set to `myControl`, the user control's location is obtained by a containing page or user control using the `myControl.Request.Path` syntax. - [!code-csharp[UserControl1#3](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#3)] - [!code-vb[UserControl1#3](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet3"::: ]]> @@ -691,8 +691,8 @@ ## Examples The following example uses the property to write the name of the Web server computer on which the user control is running. The `myControl.Response.Write` syntax instructs the user control to display the information the control obtains with the `myControl.Server.Machinename` syntax. - [!code-csharp[UserControl1#3](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#3)] - [!code-vb[UserControl1#3](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet3"::: ]]> @@ -733,8 +733,8 @@ ## Examples The following example demonstrates a user control that manages its view state using the and methods. - [!code-csharp[UserControl_StateManagement#2](~/snippets/csharp/VS_Snippets_WebNet/UserControl_StateManagement/CS/usercontrol2.cs#2)] - [!code-vb[UserControl_StateManagement#2](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_StateManagement/VB/usercontrol2.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl_StateManagement/CS/usercontrol2.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl_StateManagement/VB/usercontrol2.vb" id="Snippet2"::: ]]> @@ -783,8 +783,8 @@ ## Examples The following example uses the property to write the name of the Web server computer on which the user control is running. The `myControl.Response.Write` syntax instructs the user control to display the information the control obtains with the `myControl.Server.Machinename` syntax. - [!code-csharp[UserControl1#3](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#3)] - [!code-vb[UserControl1#3](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet3"::: ]]> @@ -829,8 +829,8 @@ ## Examples The following example adds values to the property of a user control. The `myControl.Session.Add` syntax inserts the values of two Web server controls to the session associated with the user control and the page that contains it. - [!code-csharp[UserControl1#6](~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx#6)] - [!code-vb[UserControl1#6](~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UserControl1/CS/usercontrol1.cs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UserControl1/VB/usercontrol1.vb.aspx" id="Snippet6"::: ]]> diff --git a/xml/System.Web.UI/ValidatorCollection.xml b/xml/System.Web.UI/ValidatorCollection.xml index ac0ac22dd1a..842772ddc44 100644 --- a/xml/System.Web.UI/ValidatorCollection.xml +++ b/xml/System.Web.UI/ValidatorCollection.xml @@ -37,8 +37,8 @@ ## Examples The following code example demonstrates how to access the collection through the property and use the method to iterate through the values. - [!code-csharp[ValidatorCollection_GetEnumerator#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/CS/validatorcollection_getenumerator.cs.aspx#1)] - [!code-vb[ValidatorCollection_GetEnumerator#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/VB/validatorcollection_getenumerator.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/CS/validatorcollection_getenumerator.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/VB/validatorcollection_getenumerator.vb.aspx" id="Snippet1"::: ]]> @@ -101,8 +101,8 @@ ## Examples The following code example demonstrates how to use the method. - [!code-csharp[ValidatorCollection_Add#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Add/CS/validatorcollection_add.cs#1)] - [!code-vb[ValidatorCollection_Add#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Add/VB/validatorcollection_add.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Add/CS/validatorcollection_add.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Add/VB/validatorcollection_add.vb" id="Snippet1"::: ]]> @@ -141,8 +141,8 @@ ## Examples The following code example demonstrates how to use the method. - [!code-csharp[ValidatorCollection_Contains_Remove#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/CS/validatorcollection_contains_remove.cs#1)] - [!code-vb[ValidatorCollection_Contains_Remove#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/VB/validatorcollection_contains_remove.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/CS/validatorcollection_contains_remove.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/VB/validatorcollection_contains_remove.vb" id="Snippet1"::: ]]> @@ -184,8 +184,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[ValidatorCollection_CopyTo#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_CopyTo/CS/validatorcollection_copyto.cs.aspx#1)] - [!code-vb[ValidatorCollection_CopyTo#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_CopyTo/VB/validatorcollection_copyto.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_CopyTo/CS/validatorcollection_copyto.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_CopyTo/VB/validatorcollection_copyto.vb.aspx" id="Snippet1"::: ]]> @@ -222,8 +222,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[ValidatorCollection_Constructor_Count#2](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Constructor_Count/CS/validatorcollection_constructor_count.cs.aspx#2)] - [!code-vb[ValidatorCollection_Constructor_Count#2](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Constructor_Count/VB/validatorcollection_constructor_count.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Constructor_Count/CS/validatorcollection_constructor_count.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Constructor_Count/VB/validatorcollection_constructor_count.vb.aspx" id="Snippet2"::: ]]> @@ -266,8 +266,8 @@ ## Examples The following code example demonstrates using the method. - [!code-csharp[ValidatorCollection_GetEnumerator#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/CS/validatorcollection_getenumerator.cs.aspx#1)] - [!code-vb[ValidatorCollection_GetEnumerator#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/VB/validatorcollection_getenumerator.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/CS/validatorcollection_getenumerator.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_GetEnumerator/VB/validatorcollection_getenumerator.vb.aspx" id="Snippet1"::: ]]> @@ -301,8 +301,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[ValidatorCollection_3#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx#1)] - [!code-vb[ValidatorCollection_3#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx" id="Snippet1"::: ]]> @@ -345,8 +345,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[ValidatorCollection_3#2](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx#2)] - [!code-vb[ValidatorCollection_3#2](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx" id="Snippet2"::: ]]> @@ -384,8 +384,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[ValidatorCollection_Item#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Item/CS/validatorcollection_item.cs.aspx#1)] - [!code-vb[ValidatorCollection_Item#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Item/VB/validatorcollection_item.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Item/CS/validatorcollection_item.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Item/VB/validatorcollection_item.vb.aspx" id="Snippet1"::: ]]> @@ -422,8 +422,8 @@ ## Examples The following code example demonstrates how to use the method. - [!code-csharp[ValidatorCollection_Contains_Remove#1](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/CS/validatorcollection_contains_remove.cs#1)] - [!code-vb[ValidatorCollection_Contains_Remove#1](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/VB/validatorcollection_contains_remove.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/CS/validatorcollection_contains_remove.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_Contains_Remove/VB/validatorcollection_contains_remove.vb" id="Snippet1"::: ]]> @@ -460,8 +460,8 @@ ## Examples The following code example demonstrates using the property. - [!code-csharp[ValidatorCollection_3#2](~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx#2)] - [!code-vb[ValidatorCollection_3#2](~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/ValidatorCollection_3/CS/validatorcollection_3.cs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/ValidatorCollection_3/VB/validatorcollection_3.vb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web/HttpCacheVaryByHeaders.xml b/xml/System.Web/HttpCacheVaryByHeaders.xml index b6de60eb64c..78d4630c306 100644 --- a/xml/System.Web/HttpCacheVaryByHeaders.xml +++ b/xml/System.Web/HttpCacheVaryByHeaders.xml @@ -89,8 +89,8 @@ ## Examples This following code example demonstrates how some action is performed only if the property is `true`. - [!code-csharp[Classic HttpCacheVaryByHeaders.AcceptTypes Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.AcceptTypes Example/cs/source.aspx#1)] - [!code-vb[Classic HttpCacheVaryByHeaders.AcceptTypes Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.AcceptTypes Example/vb/source.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.AcceptTypes Example/cs/source.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.AcceptTypes Example/vb/source.aspx" id="Snippet1"::: ]]> @@ -225,8 +225,8 @@ ## Examples The following code example demonstrates how some action is performed only if the property is `true`. - [!code-csharp[Classic HttpCacheVaryByHeaders.UserAgent Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserAgent Example/cs/source.aspx#1)] - [!code-vb[Classic HttpCacheVaryByHeaders.UserAgent Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserAgent Example/vb/source.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserAgent Example/cs/source.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserAgent Example/vb/source.aspx" id="Snippet1"::: ]]> @@ -272,8 +272,8 @@ ## Examples The following code example demonstrates how some action is performed only if the property is `true`. - [!code-csharp[Classic HttpCacheVaryByHeaders.UserCharSet Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserCharSet Example/cs/source.aspx#1)] - [!code-vb[Classic HttpCacheVaryByHeaders.UserCharSet Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserCharSet Example/vb/source.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserCharSet Example/cs/source.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserCharSet Example/vb/source.aspx" id="Snippet1"::: ]]> @@ -319,8 +319,8 @@ ## Examples The following code example demonstrates how some action is performed only if the property is `true`. - [!code-csharp[Classic HttpCacheVaryByHeaders.UserLanguage Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserLanguage Example/cs/source.aspx#1)] - [!code-vb[Classic HttpCacheVaryByHeaders.UserLanguage Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserLanguage Example/vb/source.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserLanguage Example/cs/source.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCacheVaryByHeaders.UserLanguage Example/vb/source.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpContext.xml b/xml/System.Web/HttpContext.xml index 7ee93466442..7da7a298fc2 100644 --- a/xml/System.Web/HttpContext.xml +++ b/xml/System.Web/HttpContext.xml @@ -583,8 +583,8 @@ End Sub ## Examples The following example demonstrates how to use the property to determine what event of the object that is handling the current request is being processed. In the example, the event handler handles several events of the object, and the property determines what code is invoked for each event being handled. - [!code-csharp[System.Web.HttpResponse.IsPostNotification#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/CS/App_Code/TestModule.cs#1)] - [!code-vb[System.Web.HttpResponse.IsPostNotification#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/VB/App_Code/TestModule.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/CS/App_Code/TestModule.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/VB/App_Code/TestModule.vb" id="Snippet1"::: ]]> @@ -1107,8 +1107,8 @@ End Sub ## Examples The following example demonstrates how to use the property to determine when an event of the object has finished processing all the associated event handlers. The custom event handler in this example handles several events of the object, and the property is used to determine what code is invoked after a specific event is handled. - [!code-csharp[System.Web.HttpResponse.IsPostNotification#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/CS/App_Code/TestModule.cs#1)] - [!code-vb[System.Web.HttpResponse.IsPostNotification#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/VB/App_Code/TestModule.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/CS/App_Code/TestModule.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.IsPostNotification/VB/App_Code/TestModule.vb" id="Snippet1"::: ]]> @@ -1441,8 +1441,8 @@ End Sub [!code-aspx-csharp[HttpContext_RewritePath#2](~/snippets/csharp/VS_Snippets_WebNet/HttpContext_ReWritePath/CS/rewritepath.aspx#2)] [!code-aspx-vb[HttpContext_RewritePath#2](~/snippets/visualbasic/VS_Snippets_WebNet/HttpContext_ReWritePath/VB/rewritepath.aspx#2)] - [!code-csharp[HttpContext_RewritePath#1](~/snippets/csharp/VS_Snippets_WebNet/HttpContext_ReWritePath/CS/global.asax#1)] - [!code-vb[HttpContext_RewritePath#1](~/snippets/visualbasic/VS_Snippets_WebNet/HttpContext_ReWritePath/VB/global.asax#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpContext_ReWritePath/CS/global.asax" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpContext_ReWritePath/VB/global.asax" id="Snippet1"::: ]]> @@ -1965,8 +1965,8 @@ firstName = DirectCast(context.Session("FirstName"), String) If the application uses Windows authentication, the user name includes the domain. For example, the page title would be "Home page for DOMAIN\username". - [!code-csharp[System.Web.HttpContext.User#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpContext.User/cs/Default.aspx.cs#1)] - [!code-vb[System.Web.HttpContext.User#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpContext.User/vb/Default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpContext.User/cs/Default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpContext.User/vb/Default.aspx.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpCookie.xml b/xml/System.Web/HttpCookie.xml index 4ef3cbab4ea..7f8fc99e25d 100644 --- a/xml/System.Web/HttpCookie.xml +++ b/xml/System.Web/HttpCookie.xml @@ -73,8 +73,8 @@ ## Examples The following code example creates and names a new cookie. - [!code-csharp[Classic HttpCookie.HttpCookie Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.HttpCookie Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie Example/VB/source.vb" id="Snippet1"::: ]]> @@ -108,8 +108,8 @@ ## Examples The following code example creates, names, and sets the value of a new cookie. - [!code-csharp[Classic HttpCookie.HttpCookie1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.HttpCookie1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HttpCookie1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -152,8 +152,8 @@ ## Examples The following code example sets the cookie's domain. - [!code-csharp[Classic HttpCookie.Domain Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Domain Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Domain Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Domain Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Domain Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Domain Example/VB/source.vb" id="Snippet1"::: ]]> @@ -185,8 +185,8 @@ ## Examples The following code example sets the expiration time of the cookie to 10 minutes from the current time. - [!code-csharp[Classic HttpCookie.Expires Example#2](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Expires Example/CS/default.aspx#2)] - [!code-vb[Classic HttpCookie.Expires Example#2](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Expires Example/VB/default.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Expires Example/CS/default.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Expires Example/VB/default.aspx" id="Snippet2"::: ]]> @@ -219,8 +219,8 @@ ## Examples The following code example examines each member of a cookie collection for multiple values. If a cookie's property is `true`, indicating that multiple values are present, this example copies the value names into one string array and the corresponding values into another string array. For an example of how to create multiple values for a cookie, see . - [!code-csharp[Classic HttpCookie.HasKeys Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HasKeys Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.HasKeys Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HasKeys Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.HasKeys Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.HasKeys Example/VB/source.vb" id="Snippet1"::: ]]> @@ -333,8 +333,8 @@ ## Examples The following code example receives a cookie collection from the client in the `Cookie` header and loops through the collection looking for a cookie with the specific name. - [!code-csharp[Classic HttpCookie.Name Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Name Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Name Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Name Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Name Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Name Example/VB/source.vb" id="Snippet1"::: ]]> @@ -377,8 +377,8 @@ The property extends the property of a new cookie. - [!code-csharp[Classic HttpCookie.Path Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Path Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Path Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Path Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Path Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Path Example/VB/source.vb" id="Snippet1"::: ]]> @@ -456,8 +456,8 @@ After these updates have been applied, the default value is `(SameSiteMode)(-1)` ## Examples The following code example takes action if the cookie is set to transmit using SSL. - [!code-csharp[Classic HttpCookie.Secure Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Secure Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Secure Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Secure Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Secure Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Secure Example/VB/source.vb" id="Snippet1"::: ]]> @@ -547,8 +547,8 @@ After these updates have been applied, the default value is `(SameSiteMode)(-1)` ## Examples The following code example sets the value of an existing cookie to "abc123". - [!code-csharp[Classic HttpCookie.Value Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Value Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Value Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Value Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Value Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Value Example/VB/source.vb" id="Snippet1"::: ]]> @@ -580,8 +580,8 @@ After these updates have been applied, the default value is `(SameSiteMode)(-1)` ## Examples The following code example creates a new cookie and adds several values to it. For an example of how to extract multiple values from one cookie, see . - [!code-csharp[Classic HttpCookie.Values Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Values Example/CS/source.cs#1)] - [!code-vb[Classic HttpCookie.Values Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Values Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpCookie.Values Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpCookie.Values Example/VB/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpRequest.xml b/xml/System.Web/HttpRequest.xml index 7bb71c03d3e..228211cbf15 100644 --- a/xml/System.Web/HttpRequest.xml +++ b/xml/System.Web/HttpRequest.xml @@ -209,8 +209,8 @@ End Class ## Examples The following code example captures the multiple values returned by the property into an object variable and writes the number and name of each value to a separate line of HTTP output. - [!code-csharp[Classic HttpRequest.AcceptTypes Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.AcceptTypes Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.AcceptTypes Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.AcceptTypes Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.AcceptTypes Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.AcceptTypes Example/VB/source.vb" id="Snippet1"::: ]]> @@ -260,8 +260,8 @@ End Class The first part of the code example shows how to set the property by handling the event in the Global.asax file. The method that is named `AnonymousIdentification_Creating` sets the property when an anonymous ID is created. - [!code-csharp[System.Web.HttpRequest_AnonymousID#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/CS/global_asax.cs#2)] - [!code-vb[System.Web.HttpRequest_AnonymousID#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/vb/global_asax.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/CS/global_asax.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_AnonymousID/vb/global_asax.vb" id="Snippet2"::: The second part of the code example shows how to display the new that is created by the `AnonymousIdentification_Creating` event handler in the preceding example. @@ -306,8 +306,8 @@ End Class ## Examples The following example uses the method to HTML-encode and then write the value of the property to a text file. This code example is part of a larger example provided for the class. It assumes the existence of a object named `sw`. - [!code-csharp[System.Web.HttpRequest_Sample1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#2)] - [!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet2"::: The following example uses the property to programmatically construct a path to a resource that is in a fixed location in the application. The page that references the resource does not have to be located in the same directory as the resource. @@ -434,8 +434,8 @@ End Class ## Examples The following code example sends a list of the browser's capabilities back to the client in an HTML page. - [!code-csharp[Classic HttpRequest.Browser Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Browser Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Browser Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Browser Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Browser Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Browser Example/VB/source.vb" id="Snippet1"::: ]]> @@ -471,8 +471,8 @@ End Class ## Examples The following code example sends the client's certificate settings back to the client in an HTML page. - [!code-csharp[Classic HttpRequest.ClientCertificate Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ClientCertificate Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.ClientCertificate Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ClientCertificate Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ClientCertificate Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ClientCertificate Example/VB/source.vb" id="Snippet1"::: ]]> @@ -509,8 +509,8 @@ End Class ## Examples The following code example assigns a value representing the description of the current HTTP encoding to a string variable. - [!code-csharp[Classic HttpRequest.ContentEncoding Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.ContentEncoding Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentEncoding Example/VB/source.vb" id="Snippet1"::: ]]> @@ -542,8 +542,8 @@ End Class ## Examples The following code example assigns the value representing the content length of the incoming request to an integer variable. - [!code-csharp[Classic HttpRequest.ContentLength Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentLength Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.ContentLength Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentLength Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentLength Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentLength Example/VB/source.vb" id="Snippet1"::: ]]> @@ -581,8 +581,8 @@ End Class ## Examples The following code example assigns the value representing the content type of the incoming request to a string variable. - [!code-csharp[Classic HttpRequest.ContentType Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentType Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.ContentType Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentType Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ContentType Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ContentType Example/VB/source.vb" id="Snippet1"::: The following example shows output that might be produced by this code. @@ -632,8 +632,8 @@ End Class ## Examples The following code example loops through all cookies sent by the client and sends the name, expiration date, security parameter, and values of each cookie to the HTTP output. - [!code-csharp[Classic HttpRequest.Cookies Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Cookies Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Cookies Example/VB/source.vb" id="Snippet1"::: ]]> @@ -673,8 +673,8 @@ End Class ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#2)] - [!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet2"::: ]]> @@ -737,8 +737,8 @@ End Class ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#2)] - [!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet2"::: ]]> @@ -777,8 +777,8 @@ End Class ## Examples The following code example displays the names of all files in the collection. - [!code-csharp[Classic HttpRequest.Files Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Files Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Files Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Files Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Files Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Files Example/VB/source.vb" id="Snippet1"::: ]]> @@ -849,8 +849,8 @@ End Class ## Examples The following example shows how to read the values in the form collection posted from a browser. Each name/value pair in the collection represents a control in the form and its value. - [!code-csharp[Classic HttpRequest.Form Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Form Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Form Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Form Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Form Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Form Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1031,8 +1031,8 @@ End Class ## Examples The following code example displays the names and values of all headers in the HTTP request. - [!code-csharp[Classic HttpRequest.Headers Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Headers Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Headers Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1087,8 +1087,8 @@ End Class ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#7)] - [!code-vb[System.Web.HttpRequest_Sample1#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet7"::: The following example shows output that is produced by this code. @@ -1130,8 +1130,8 @@ End Class ## Examples The following code example copies the contents of an into a string. - [!code-csharp[Classic HttpRequest.InputStream Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.InputStream Example/cs/source.aspx#1)] - [!code-vb[Classic HttpRequest.InputStream Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.InputStream Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.InputStream Example/cs/source.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.InputStream Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1258,8 +1258,8 @@ End Class ## Examples The following code example uses the property to determine whether the current request has been authenticated. If it has not been authenticated, the request is redirected to another page where users can enter their credentials into the Web application. This is a common technique used in the default page for an application. - [!code-csharp[System.Web.HttpRequest_Sample3#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample3/CS/isauthenticatedcs.aspx#1)] - [!code-vb[System.Web.HttpRequest_Sample3#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample3/VB/isauthenticatedvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample3/CS/isauthenticatedcs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample3/VB/isauthenticatedvb.aspx" id="Snippet1"::: ]]> @@ -1322,8 +1322,8 @@ End Class ## Examples The following code example determines whether the property is set to false. If it is, the property is set to true to stop the response from being sent. - [!code-csharp[System.Web.HttpResponse_Sample5#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponsesuppresscontentcs.aspx#3)] - [!code-vb[System.Web.HttpResponse_Sample5#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponsesuppresscontentvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponsesuppresscontentcs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponsesuppresscontentvb.aspx" id="Snippet3"::: ]]> @@ -1478,8 +1478,8 @@ End Class The second part of the example shows a class that inherits from and converts all characters in a stream to uppercase. Put this code in the `App_Code` folder for your application. - [!code-csharp[System.Web.HttpRequest_Samples2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Samples2/CS/responsefilter.cs#2)] - [!code-vb[System.Web.HttpRequest_Samples2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Samples2/VB/responsefilter.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Samples2/CS/responsefilter.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Samples2/VB/responsefilter.vb" id="Snippet2"::: ]]> @@ -1635,8 +1635,8 @@ No object is defined for the request. method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#2)] - [!code-vb[System.Web.HttpRequest_Sample1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet2"::: ]]> @@ -1675,8 +1675,8 @@ No object is defined for the request. property contains an empty string. If it does, the method writes a string indicating this to a file. If it does not, the method HTML-encodes the value of the property and the method writes the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#4)] - [!code-vb[System.Web.HttpRequest_Sample1#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet4"::: ]]> @@ -1710,8 +1710,8 @@ No object is defined for the request. method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#5)] - [!code-vb[System.Web.HttpRequest_Sample1#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet5"::: ]]> @@ -1748,8 +1748,8 @@ No object is defined for the request. method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#5)] - [!code-vb[System.Web.HttpRequest_Sample1#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet5"::: ]]> @@ -1839,8 +1839,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#5)] - [!code-vb[System.Web.HttpRequest_Sample1#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet5"::: ]]> @@ -1956,8 +1956,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#7)] - [!code-vb[System.Web.HttpRequest_Sample1#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet7"::: ]]> @@ -1999,8 +1999,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example calls the method when a page is loaded. The call specifies that the request be saved as a text file in a directory where the ASP.NET process identity has been granted write permissions, and that any header information included in the request is included in the file. - [!code-csharp[System.Web.HttpRequest_Sample6#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample6/cs/requestsample6cs.aspx#1)] - [!code-vb[System.Web.HttpRequest_Sample6#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample6/vb/requestsample6vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample6/cs/requestsample6cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample6/vb/requestsample6vb.aspx" id="Snippet1"::: ]]> @@ -2038,8 +2038,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example displays the names and values of all named server variables. - [!code-csharp[Classic HttpRequest.ServerVariables Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ServerVariables Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.ServerVariables Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ServerVariables Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.ServerVariables Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.ServerVariables Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2133,8 +2133,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example determines whether the property value is greater than 1000 bytes and writes that information to a file. - [!code-csharp[System.Web.HttpRequest_Sample1#6](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#6)] - [!code-vb[System.Web.HttpRequest_Sample1#6](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet6"::: ]]> @@ -2198,8 +2198,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example assigns the object of the current request to an object variable and displays the value of two properties of the URL object to the HTTP output. - [!code-csharp[Classic HttpRequest.Url Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Url Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.Url Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Url Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.Url Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.Url Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2233,8 +2233,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example displays the value of two properties of the URL that referred the client to the current application. - [!code-csharp[Classic HttpRequest.UrlReferrer Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UrlReferrer Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.UrlReferrer Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UrlReferrer Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UrlReferrer Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UrlReferrer Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2267,8 +2267,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example assigns the type identification of the requesting browser to a string variable. - [!code-csharp[Classic HttpRequest.UserAgent Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UserAgent Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.UserAgent Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UserAgent Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UserAgent Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UserAgent Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2304,8 +2304,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#7)] - [!code-vb[System.Web.HttpRequest_Sample1#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet7"::: ]]> @@ -2337,8 +2337,8 @@ Dim fullname2 As String = Request("fullname") ## Examples The following code example uses the method to HTML-encode the value of the property and the method to write the encoded value to the file. This code example is part of a larger example provided for the class. - [!code-csharp[System.Web.HttpRequest_Sample1#7](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx#7)] - [!code-vb[System.Web.HttpRequest_Sample1#7](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx#7)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/CS/requestdetailscs.aspx" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpRequest_Sample1/VB/requestdetailsvb.aspx" id="Snippet7"::: ]]> @@ -2372,8 +2372,8 @@ Dim fullname2 As String = Request("fullname") The language names are provided by the browser, and there is no definitive list of all possible codes. Typically these consist of a two-character codes for the language, a hyphen, and a two-character code for the culture, such as "en-us" for U.S. English and "fr-ca" for Canadian French. - [!code-csharp[Classic HttpRequest.UserLanguages Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UserLanguages Example/CS/source.cs#1)] - [!code-vb[Classic HttpRequest.UserLanguages Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UserLanguages Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpRequest.UserLanguages Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpRequest.UserLanguages Example/VB/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpResponse.xml b/xml/System.Web/HttpResponse.xml index ae1b94baf14..0493db3d697 100644 --- a/xml/System.Web/HttpResponse.xml +++ b/xml/System.Web/HttpResponse.xml @@ -377,8 +377,8 @@ ## Examples The following example shows how to add a single file name to the file dependency list. If the file changes, the cached response is invalidated. - [!code-csharp[Classic HttpResponse.AddFileDependency Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AddFileDependency Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.AddFileDependency Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AddFileDependency Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AddFileDependency Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AddFileDependency Example/VB/source.vb" id="Snippet1"::: ]]> @@ -501,8 +501,8 @@ ## Examples The following example creates a new cookie named `LastVisit`, sets the value of the cookie to the current date and time, and appends the cookie to the current cookie collection. All cookies in the cookie collection are sent to the client in the `Set-Cookie` header with the HTTP output stream. - [!code-csharp[Classic HttpResponse.AppendCookie Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AppendCookie Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.AppendCookie Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AppendCookie Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AppendCookie Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AppendCookie Example/VB/source.vb" id="Snippet1"::: ]]> @@ -545,8 +545,8 @@ ## Examples The following example calls the method to add a custom header to the object sent to the requesting client. - [!code-csharp[System.Web.HttpResponse.AppendHeader_Example#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.AppendHeader_Example/CS/responseappendheader.cs.aspx#1)] - [!code-vb[System.Web.HttpResponse.AppendHeader_Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.AppendHeader_Example/VB/responseappendheader.vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.AppendHeader_Example/CS/responseappendheader.cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.AppendHeader_Example/VB/responseappendheader.vb.aspx" id="Snippet1"::: ]]> @@ -597,8 +597,8 @@ ## Examples The following example shows how to append a string to the log. - [!code-csharp[Classic HttpResponse.AppendToLog Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AppendToLog Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.AppendToLog Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AppendToLog Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.AppendToLog Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.AppendToLog Example/VB/source.vb" id="Snippet1"::: ]]> @@ -638,8 +638,8 @@ ## Examples The following example declares a string variable named `urlConverted`, and sets it to the result of an method call. The code then passes the variable's value to a control's property. - [!code-csharp[System.Web.HttpResponse_Sample5#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/responseapppathmodifiercs.aspx#5)] - [!code-vb[System.Web.HttpResponse_Sample5#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/responseapppathmodifiervb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/responseapppathmodifiercs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/responseapppathmodifiervb.aspx" id="Snippet5"::: ]]> @@ -709,8 +709,8 @@ ## Examples The following example reads a text file into a buffer and writes the buffer to the HTTP output stream. - [!code-csharp[Classic HttpResponse.BinaryWrite Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.BinaryWrite Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.BinaryWrite Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.BinaryWrite Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.BinaryWrite Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.BinaryWrite Example/VB/source.vb" id="Snippet1"::: ]]> @@ -792,8 +792,8 @@ For a complete example, see the class. - [!code-csharp[System.Web.HttpResponse_Samples1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx#2)] - [!code-vb[System.Web.HttpResponse_Samples1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx" id="Snippet2"::: ]]> @@ -825,8 +825,8 @@ ## Examples The following example writes properties of the current cache policy to the HTTP output stream. - [!code-csharp[Classic HttpResponse.Cache Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cache Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.Cache Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cache Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cache Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cache Example/VB/source.vb" id="Snippet1"::: ]]> @@ -894,8 +894,8 @@ ## Examples The following example checks whether the character set of the output stream is Central European (ISO). - [!code-csharp[System.Web.HttpResponse.Charset#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.Charset/cs/default.aspx#1)] - [!code-vb[System.Web.HttpResponse.Charset#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.Charset/vb/default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.Charset/cs/default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.Charset/vb/default.aspx" id="Snippet1"::: ]]> @@ -933,8 +933,8 @@ For a complete example, see the class. - [!code-csharp[System.Web.HttpResponse_Samples1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx#2)] - [!code-vb[System.Web.HttpResponse_Samples1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx" id="Snippet2"::: ]]> @@ -976,8 +976,8 @@ ## Examples The following example clears all content from the buffer stream. - [!code-csharp[Classic HttpResponse.ClearContent Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.ClearContent Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.ClearContent Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.ClearContent Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.ClearContent Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.ClearContent Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1010,8 +1010,8 @@ ## Examples The following example calls the method to ensure that no headers are sent with the current response. This technique can be especially important if the ASP.NET response is generating an image, such as a JPEG file. In this example the property is set to image/jpeg. - [!code-csharp[System.Web.HttpResponse_Sample5#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponseclearheaderscs.aspx#2)] - [!code-vb[System.Web.HttpResponse_Sample5#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponseclearheadersvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponseclearheaderscs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponseclearheadersvb.aspx" id="Snippet2"::: ]]> @@ -1122,8 +1122,8 @@ ## Examples The following example writes a human-readable description of the character set encoding to the output stream. - [!code-csharp[Classic HttpResponse.ContentEncoding Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.ContentEncoding Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.ContentEncoding Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.ContentEncoding Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.ContentEncoding Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.ContentEncoding Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1164,8 +1164,8 @@ For a complete example, see the class. - [!code-csharp[System.Web.HttpResponse_Samples1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx#2)] - [!code-vb[System.Web.HttpResponse_Samples1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/CS/responsesamplescs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Samples1/VB/responsesamplesvb.aspx" id="Snippet2"::: ]]> @@ -1203,8 +1203,8 @@ ## Examples The following example creates a new cookie named `LastVisit`, sets the value of the cookie to the current date and time, and adds the cookie to the current cookie collection. All cookies in the cookie collection are sent to the client in the `Set-Cookie` header with the HTTP output stream. - [!code-csharp[Classic HttpResponse.Cookies Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.Cookies Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Cookies Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1930,8 +1930,8 @@ ## Examples The following example forces an unconditional redirection to another Web site. - [!code-csharp[Classic HttpResponse.Redirect Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Redirect Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.Redirect Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Redirect Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.Redirect Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.Redirect Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2824,8 +2824,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example updates the value of an existing cookie. - [!code-csharp[Classic HttpResponse.SetCookie Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.SetCookie Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.SetCookie Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.SetCookie Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.SetCookie Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.SetCookie Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2898,8 +2898,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example checks the status code of the output stream. If the status code is not equal to 200, additional code is executed. - [!code-csharp[System.Web.HttpResponse.StatusCode#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.StatusCode/cs/default.aspx#1)] - [!code-vb[System.Web.HttpResponse.StatusCode#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.StatusCode/vb/default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.StatusCode/cs/default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.StatusCode/vb/default.aspx" id="Snippet1"::: ]]> @@ -2934,8 +2934,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example checks the status string of the output stream. If the status is not equal to "OK", additional code is executed. - [!code-csharp[System.Web.HttpResponse.StatusDescription#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.StatusDescription/cs/default.aspx#1)] - [!code-vb[System.Web.HttpResponse.StatusDescription#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.StatusDescription/vb/default.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.StatusDescription/cs/default.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.StatusDescription/vb/default.aspx" id="Snippet1"::: ]]> @@ -2972,8 +2972,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example sets the property in an event handler for the instance of the event. Put the code file in the App_Code folder of your Web application and configure the Web.config file to register the module. For more information, see [Walkthrough: Creating and Registering a Custom HTTP Module](/previous-versions/aspnet/ms227673(v=vs.100)). - [!code-csharp[System.Web.HttpResponse.SubStatusCode#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.SubStatusCode/CS/App_Code/TestModule.cs#1)] - [!code-vb[System.Web.HttpResponse.SubStatusCode#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.SubStatusCode/VB/App_Code/TestModule.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.SubStatusCode/CS/App_Code/TestModule.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.SubStatusCode/VB/App_Code/TestModule.vb" id="Snippet1"::: ]]> @@ -3044,8 +3044,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example checks whether the property is set to false. If it is, the property is set to true to stop the response from being sent. - [!code-csharp[System.Web.HttpResponse_Sample5#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponsesuppresscontentcs.aspx#3)] - [!code-vb[System.Web.HttpResponse_Sample5#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponsesuppresscontentvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/CS/httpresponsesuppresscontentcs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse_Sample5/VB/httpresponsesuppresscontentvb.aspx" id="Snippet3"::: ]]> @@ -3339,8 +3339,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example echoes the client's name back to the client's browser. The method strips any malicious script and invalid characters that may have been submitted in the `UserName` input field. - [!code-csharp[System.Web.HttpResponse.Write#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.Write/CS/systemwebhttpresponsewrite.cs#1)] - [!code-vb[System.Web.HttpResponse.Write#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.Write/vb/systemwebhttpresponsewrite.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.HttpResponse.Write/CS/systemwebhttpresponsewrite.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.HttpResponse.Write/vb/systemwebhttpresponsewrite.vb" id="Snippet1"::: ]]> @@ -3427,8 +3427,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example writes all the contents of a text file named `Login.txt` (which might contain literal HTML text and input controls) directly to the output stream. - [!code-csharp[Classic HttpResponse.WriteFile Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.WriteFile Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3469,8 +3469,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example writes a file to memory. - [!code-csharp[Classic HttpResponse.WriteFile1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.WriteFile1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3513,8 +3513,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example writes all the contents of a text file named `Login.txt` (which might contain literal HTML text and input controls) directly to the output stream. - [!code-csharp[Classic HttpResponse.WriteFile3 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile3 Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.WriteFile3 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile3 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile3 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile3 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3564,8 +3564,8 @@ Response.RedirectToRoutePermanent("Product", ## Examples The following example writes all the contents of a text file named `Login.txt` (which might contain literal text and HTML input controls) directly to the output stream. - [!code-csharp[Classic HttpResponse.WriteFile2 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile2 Example/CS/source.cs#1)] - [!code-vb[Classic HttpResponse.WriteFile2 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile2 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpResponse.WriteFile2 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpResponse.WriteFile2 Example/VB/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpServerUtility.xml b/xml/System.Web/HttpServerUtility.xml index 095fa712252..dcffa0d341c 100644 --- a/xml/System.Web/HttpServerUtility.xml +++ b/xml/System.Web/HttpServerUtility.xml @@ -61,8 +61,8 @@ ## Examples The following example clears the last exception that was thrown. - [!code-csharp[Classic HttpServerUtility.ClearError Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.ClearError Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.ClearError Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.ClearError Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.ClearError Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.ClearError Example/VB/source.vb" id="Snippet1"::: ]]> @@ -108,8 +108,8 @@ ## Examples The following example creates an object by using the object's ProgID. - [!code-csharp[Classic HttpServerUtility.CreateObject Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObject Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.CreateObject Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObject Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObject Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObject Example/VB/source.vb" id="Snippet1"::: ]]> @@ -174,8 +174,8 @@ ## Examples The following example demonstrates how to use the method to create a server instance of a COM object. - [!code-csharp[Classic HttpServerUtility.CreateObjectFromClsid Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObjectFromClsid Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.CreateObjectFromClsid Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObjectFromClsid Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObjectFromClsid Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.CreateObjectFromClsid Example/VB/source.vb" id="Snippet1"::: ]]> @@ -238,8 +238,8 @@ ## Examples The following example displays the .aspx page "Updateinfo.aspx" in the current directory. Program execution returns to the starting page after the Updateinfo.aspx page is displayed. - [!code-csharp[Classic HttpServerUtility.Execute Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Execute Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.Execute Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Execute Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Execute Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Execute Example/VB/source.vb" id="Snippet1"::: ]]> @@ -293,8 +293,8 @@ ## Examples The following example shows how to execute the .aspx page `Updateinfo.aspx` in the current request and preserve the and collections. Program execution returns to the starting page after `Updateinfo.aspx` is displayed. - [!code-csharp[HttpServerUtility.Execute#1](~/snippets/csharp/VS_Snippets_WebNet/HttpServerUtility.Execute/CS/httpserverutility.execute_cs.aspx#1)] - [!code-vb[HttpServerUtility.Execute#1](~/snippets/visualbasic/VS_Snippets_WebNet/HttpServerUtility.Execute/VB/httpserverutility.execute_vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpServerUtility.Execute/CS/httpserverutility.execute_cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpServerUtility.Execute/VB/httpserverutility.execute_vb.aspx" id="Snippet1"::: ]]> @@ -360,8 +360,8 @@ ## Examples The following example executes the `Login.aspx` page on the server in the current directory and receives the output from the page through the object `writer`. It writes the HTML stream received from `writer` to the HTTP output stream. - [!code-csharp[Classic HttpServerUtility.Execute1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Execute1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.Execute1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Execute1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Execute1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Execute1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -423,8 +423,8 @@ ## Examples The following example executes the `Login.aspx` page on the server in the current directory and receives the output from the page through the object `writer`. It writes the HTML stream received from `writer` to the HTTP output stream. The contents of the and collections are preserved. - [!code-csharp[HttpServerUtility.Execute02#1](~/snippets/csharp/VS_Snippets_WebNet/HttpServerUtility.Execute02/CS/httpserverutility.execute02_cs.aspx#1)] - [!code-vb[HttpServerUtility.Execute02#1](~/snippets/visualbasic/VS_Snippets_WebNet/HttpServerUtility.Execute02/VB/httpserverutility.execute02_vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpServerUtility.Execute02/CS/httpserverutility.execute02_cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpServerUtility.Execute02/VB/httpserverutility.execute02_vb.aspx" id="Snippet1"::: ]]> @@ -517,8 +517,8 @@ ## Examples The following example prints a description of the application's last error to the HTTP output stream. It prints "No Errors" if no errors have been encountered. - [!code-csharp[Classic HttpServerUtility.GetLastError Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.GetLastError Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.GetLastError Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.GetLastError Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.GetLastError Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.GetLastError Example/VB/source.vb" id="Snippet1"::: ]]> @@ -626,8 +626,8 @@ ## Examples The following example decodes a string that has been HTML-encoded for transmission over HTTP. It decodes the supplied string named `EncodedString` which contains the text "This is a <Test String>.", and copies it into the string named `DecodedString` as "This is a \.". - [!code-csharp[Classic HttpServerUtility.HtmlDecode1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlDecode1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.HtmlDecode1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlDecode1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlDecode1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlDecode1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -685,13 +685,13 @@ ## Examples The following example shows how to HTML-encode a value that potentially codes unsafe code. The code resides in the code-behind file for a web page. The value to encode is hard-coded in this example only to simplify the example and show the type of value you might HTML-encode. Typically, you would HTML-encode a value that you received from the user or the request. `Result` refers to a `Literal` control. - [!code-csharp[System.Web.HttpServerUtility.HtmlEncode#1](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/cs/default.aspx.cs#1)] - [!code-vb[System.Web.HttpServerUtility.HtmlEncode#1](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/vb/default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/cs/default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/vb/default.aspx.vb" id="Snippet1"::: The next example is similar to the previous example except it shows how to HTML-encode a value from within a class that is not in the code-behind file. - [!code-csharp[System.Web.HttpServerUtility.HtmlEncode#2](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/cs/sampleclass.cs#2)] - [!code-vb[System.Web.HttpServerUtility.HtmlEncode#2](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/vb/sampleclass.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/cs/sampleclass.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.htmlencode/vb/sampleclass.vb" id="Snippet2"::: ]]> @@ -737,8 +737,8 @@ ## Examples The following example encodes a string for transmission by HTTP. It encodes the string named `TestString`, which contains the text "This is a \.", and copies it into the string named `EncodedString` as "This is a <Test String>.". - [!code-csharp[Classic HttpServerUtility.HtmlEncode1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlEncode1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.HtmlEncode1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlEncode1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlEncode1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.HtmlEncode1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -776,8 +776,8 @@ ## Examples The following example stores the server's computer name as a string variable. - [!code-csharp[Classic HttpServerUtility.MachineName Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.MachineName Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.MachineName Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.MachineName Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.MachineName Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.MachineName Example/VB/source.vb" id="Snippet1"::: ]]> @@ -833,13 +833,13 @@ ## Examples The following example shows how to retrieve the physical file of a relative virtual path. The code resides in the code-behind file for a web page and utilizes the default `Server` object. - [!code-csharp[System.Web.HttpServerUtility.MapPath#1](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.mappath/cs/default.aspx.cs#1)] - [!code-vb[System.Web.HttpServerUtility.MapPath#1](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.mappath/vb/default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.mappath/cs/default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.mappath/vb/default.aspx.vb" id="Snippet1"::: The next example is similar to the previous example except it shows how to retrieve a physical path from within a class that is not in the code-behind file. - [!code-csharp[System.Web.HttpServerUtility.MapPath#2](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.mappath/cs/sampleclass.cs#2)] - [!code-vb[System.Web.HttpServerUtility.MapPath#2](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.mappath/vb/sampleclass.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.mappath/cs/sampleclass.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.mappath/vb/sampleclass.vb" id="Snippet2"::: ]]> @@ -884,8 +884,8 @@ ## Examples The following example sets the request time-out period to 60 seconds. - [!code-csharp[Classic HttpServerUtility.ScriptTimeout Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.ScriptTimeout Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.ScriptTimeout Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.ScriptTimeout Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.ScriptTimeout Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.ScriptTimeout Example/VB/source.vb" id="Snippet1"::: ]]> @@ -990,8 +990,8 @@ ## Examples The following example executes a new page in the same directory as the current page. - [!code-csharp[Classic HttpServerUtility.Transfer Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Transfer Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.Transfer Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Transfer Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.Transfer Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.Transfer Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1302,13 +1302,13 @@ ## Examples The following example shows how to URL-decode a value that is retrieved from the query string. The code resides in the code-behind file for a web page. `ReturnPage` refers to a `HyperLink` control. - [!code-csharp[System.Web.HttpServerUtility.UrlDecode#1](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/cs/default.aspx.cs#1)] - [!code-vb[System.Web.HttpServerUtility.UrlDecode#1](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/vb/default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/cs/default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/vb/default.aspx.vb" id="Snippet1"::: The next example is similar to the previous example except it shows how to URL-decode a value from within a class that is not in the code-behind file. - [!code-csharp[System.Web.HttpServerUtility.UrlDecode#2](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/cs/sampleclass.cs#2)] - [!code-vb[System.Web.HttpServerUtility.UrlDecode#2](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/vb/sampleclass.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/cs/sampleclass.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urldecode/vb/sampleclass.vb" id="Snippet2"::: ]]> @@ -1354,8 +1354,8 @@ ## Examples The following example decodes the string named `EncodedString` (received in a URL) into the string named `DecodedString`. - [!code-csharp[Classic HttpServerUtility.UrlDecode1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.UrlDecode1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.UrlDecode1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.UrlDecode1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.UrlDecode1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.UrlDecode1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1421,13 +1421,13 @@ ## Examples The following example shows how to URL-encode a value that is used as a query string value of a hyperlink. The code resides in the code-behind file for a web page. The value to encode is hard-coded in this example only to simplify the example and show the type of value you might URL-encode. Typically, you would URL-encode a value that you received from the user or the request. `NextPage` refers to a `HyperLink` control. - [!code-csharp[System.Web.HttpServerUtility.UrlEncode#1](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/cs/default.aspx.cs#1)] - [!code-vb[System.Web.HttpServerUtility.UrlEncode#1](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/vb/default.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/cs/default.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/vb/default.aspx.vb" id="Snippet1"::: The next example is similar to the previous example except it shows how to URL-encode a value from within a class that is not in the code-behind file. - [!code-csharp[System.Web.HttpServerUtility.UrlEncode#2](~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/cs/sampleclass.cs#2)] - [!code-vb[System.Web.HttpServerUtility.UrlEncode#2](~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/vb/sampleclass.vb#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/cs/sampleclass.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.httpserverutility.urlencode/vb/sampleclass.vb" id="Snippet2"::: ]]> @@ -1473,8 +1473,8 @@ ## Examples The following example encodes a string for transmission by HTTP. It encodes the string named `TestString`, which contains the text "This is a \.", and copies it into the string named `EncodedString` as "This+is+a+%3cTest+String%3e.". - [!code-csharp[Classic HttpServerUtility.UrlEncode1 Example#1](~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.UrlEncode1 Example/CS/source.cs#1)] - [!code-vb[Classic HttpServerUtility.UrlEncode1 Example#1](~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.UrlEncode1 Example/VB/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic HttpServerUtility.UrlEncode1 Example/CS/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic HttpServerUtility.UrlEncode1 Example/VB/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/ParserError.xml b/xml/System.Web/ParserError.xml index aee77094d6c..acb9b1ffbbc 100644 --- a/xml/System.Web/ParserError.xml +++ b/xml/System.Web/ParserError.xml @@ -33,8 +33,8 @@ ## Examples The following code example demonstrates how to add a new parser error to a object. - [!code-csharp[System.Web.ParserErrorCollection#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#3)] - [!code-vb[System.Web.ParserErrorCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet3"::: ]]> @@ -79,8 +79,8 @@ ## Examples The following code example demonstrates how to initialize an empty instance of the class and how to use its properties. - [!code-csharp[System.Web.ParserError#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx#1)] - [!code-vb[System.Web.ParserError#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx" id="Snippet1"::: ]]> @@ -165,8 +165,8 @@ ## Examples The following code example demonstrates how to populate the property for a object. - [!code-csharp[System.Web.ParserError#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx#3)] - [!code-vb[System.Web.ParserError#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx" id="Snippet3"::: ]]> @@ -212,8 +212,8 @@ ## Examples The following code example demonstrates how to populate the property for a object. - [!code-csharp[System.Web.ParserError#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx#4)] - [!code-vb[System.Web.ParserError#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx" id="Snippet4"::: ]]> @@ -244,8 +244,8 @@ ## Examples The following code example demonstrates how to populate the property for a object. - [!code-csharp[System.Web.ParserError#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx#5)] - [!code-vb[System.Web.ParserError#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserError/CS/parsererror_cs.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserError/VB/parsererror_vb.aspx" id="Snippet5"::: ]]> diff --git a/xml/System.Web/ParserErrorCollection.xml b/xml/System.Web/ParserErrorCollection.xml index a749f8d4bbd..7ec4339221c 100644 --- a/xml/System.Web/ParserErrorCollection.xml +++ b/xml/System.Web/ParserErrorCollection.xml @@ -49,8 +49,8 @@ ## Examples The following code example demonstrates how to use the methods. - [!code-csharp[System.Web.ParserErrorCollection#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#1)] - [!code-vb[System.Web.ParserErrorCollection#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet1"::: ]]> @@ -94,8 +94,8 @@ ## Examples The following code example demonstrates how to initialize an instance of the class. - [!code-csharp[System.Web.ParserErrorCollection#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#2)] - [!code-vb[System.Web.ParserErrorCollection#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet2"::: ]]> @@ -166,8 +166,8 @@ ## Examples The following code example demonstrates how to add a object to a object. - [!code-csharp[System.Web.ParserErrorCollection#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#3)] - [!code-vb[System.Web.ParserErrorCollection#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet3"::: ]]> @@ -215,8 +215,8 @@ ## Examples The following code example demonstrates how to add a range of objects to a object. - [!code-csharp[System.Web.ParserErrorCollection#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#4)] - [!code-vb[System.Web.ParserErrorCollection#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet4"::: ]]> @@ -257,8 +257,8 @@ ## Examples The following code example demonstrates how to add a range of objects to a object. - [!code-csharp[System.Web.ParserErrorCollection#4](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#4)] - [!code-vb[System.Web.ParserErrorCollection#4](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#4)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet4"::: ]]> @@ -300,8 +300,8 @@ ## Examples The following code example demonstrates how to search for an instance of a specified object in a object. - [!code-csharp[System.Web.ParserErrorCollection#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#5)] - [!code-vb[System.Web.ParserErrorCollection#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet5"::: ]]> @@ -350,8 +350,8 @@ ## Examples The following code example demonstrates how to copy the contents of a object to the specified array. - [!code-csharp[System.Web.ParserErrorCollection#6](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#6)] - [!code-vb[System.Web.ParserErrorCollection#6](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet6"::: ]]> @@ -391,8 +391,8 @@ ## Examples The following code example demonstrates how to locate the index of a object at the specified index in a collection. - [!code-csharp[System.Web.ParserErrorCollection#5](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#5)] - [!code-vb[System.Web.ParserErrorCollection#5](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#5)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet5"::: ]]> @@ -435,8 +435,8 @@ ## Examples The following code example demonstrates how to insert a object at the specified index in a collection. - [!code-csharp[System.Web.ParserErrorCollection#8](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#8)] - [!code-vb[System.Web.ParserErrorCollection#8](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet8"::: ]]> @@ -508,8 +508,8 @@ ## Examples The following code example demonstrates how to remove a from the specified index in a object. - [!code-csharp[System.Web.ParserErrorCollection#8](~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx#8)] - [!code-vb[System.Web.ParserErrorCollection#8](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx#8)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.ParserErrorCollection/CS/ParserErrorCollection_CS.aspx" id="Snippet8"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.ParserErrorCollection/VB/ParserErrorCollection_VB.aspx" id="Snippet8"::: ]]> diff --git a/xml/System.Web/SiteMapNode.xml b/xml/System.Web/SiteMapNode.xml index 5a9b85f6dd1..7f5fb790a50 100644 --- a/xml/System.Web/SiteMapNode.xml +++ b/xml/System.Web/SiteMapNode.xml @@ -41,15 +41,15 @@ The following code example demonstrates how to use the constructor to create a new collection, and then add elements to it with the method. - [!code-csharp[System.Web.SiteMapNode_2#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs#1)] - [!code-vb[System.Web.SiteMapNode_2#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb" id="Snippet1"::: The following code example demonstrates how the `SimpleTextSiteMapProvider` parses a text file that contains site map data in comma-delimited strings. A new object is added to the internal tracking collections of the class for each line that is read from the file. This code example is part of a larger example provided for the class. - [!code-csharp[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#9](~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs#9)] - [!code-vb[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#9](~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb" id="Snippet9"::: ]]> @@ -152,8 +152,8 @@ ## Examples The following code example demonstrates how to use the constructor to create a new collection, and then add elements to it with the method. - [!code-csharp[System.Web.SiteMapNode_2#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs#1)] - [!code-vb[System.Web.SiteMapNode_2#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb" id="Snippet1"::: ]]> @@ -211,9 +211,9 @@ This code example is part of a larger example provided for the method. - [!code-cpp[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#6](~/snippets/cpp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CPP/accesssitemapprovider.cpp#6)] - [!code-csharp[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#6](~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CS/accesssitemapprovider.cs#6)] - [!code-vb[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#6](~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/VB/accesssitemapprovider.vb#6)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CPP/accesssitemapprovider.cpp" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CS/accesssitemapprovider.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/VB/accesssitemapprovider.vb" id="Snippet6"::: ]]> @@ -273,8 +273,8 @@ This code example is part of a larger example provided for the abstract class. - [!code-csharp[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#9](~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs#9)] - [!code-vb[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#9](~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb#9)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb" id="Snippet9"::: ]]> @@ -500,8 +500,8 @@ ## Examples The following code example demonstrates how to call the method to create a duplicate site map node from the current node. The `ExpandForumPaths` method is registered to handle the event. It uses the method to create a working copy of the current site map node, modify attributes based on personalization data, and return the working copy. - [!code-csharp[System.Web.SiteMap.SiteMapResolve#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMap.SiteMapResolve/CS/sitemapresolve1cs.aspx.cs#1)] - [!code-vb[System.Web.SiteMap.SiteMapResolve#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMap.SiteMapResolve/VB/sitemapresolve1vb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMap.SiteMapResolve/CS/sitemapresolve1cs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMap.SiteMapResolve/VB/sitemapresolve1vb.aspx.vb" id="Snippet1"::: ]]> @@ -621,8 +621,8 @@ ## Examples The following code example demonstrates how to retrieve all the child nodes of the with the method. - [!code-csharp[System.Web.SiteMapNodeCollection_1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx#1)] - [!code-vb[System.Web.SiteMapNodeCollection_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx" id="Snippet1"::: ]]> @@ -1825,9 +1825,9 @@ This code example is part of a larger example provided for the class. - [!code-cpp[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#4](~/snippets/cpp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CPP/accesssitemapprovider.cpp#4)] - [!code-csharp[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#4](~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CS/accesssitemapprovider.cs#4)] - [!code-vb[Urtue.Samples.Alexkr.AccessSiteMapProvider_1#4](~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/VB/accesssitemapprovider.vb#4)] + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CPP/accesssitemapprovider.cpp" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/CS/accesssitemapprovider.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.AccessSiteMapProvider_1/VB/accesssitemapprovider.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Web/SiteMapNodeCollection.xml b/xml/System.Web/SiteMapNodeCollection.xml index 899cbe00275..c367a61664f 100644 --- a/xml/System.Web/SiteMapNodeCollection.xml +++ b/xml/System.Web/SiteMapNodeCollection.xml @@ -65,8 +65,8 @@ ## Examples The following code example demonstrates how to create a collection, and then add objects to it using the method. The is a subset of the current site map, showing only the first two hierarchical levels. - [!code-csharp[System.Web.SiteMapNodeCollection_2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx#2)] - [!code-vb[System.Web.SiteMapNodeCollection_2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx" id="Snippet2"::: ]]> @@ -113,8 +113,8 @@ ## Examples The following code example demonstrates how to use the constructor to create a new collection, and then add elements to the with the method. - [!code-csharp[System.Web.SiteMapNode_2#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs#1)] - [!code-vb[System.Web.SiteMapNode_2#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb" id="Snippet1"::: ]]> @@ -181,8 +181,8 @@ ## Examples The following code example demonstrates how to create a collection with a single initial object, and then add a of objects to it using the method. You can modify the , even though the individual objects might be read-only. - [!code-csharp[System.Web.SiteMapNodeCollection_2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx#2)] - [!code-vb[System.Web.SiteMapNodeCollection_2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx" id="Snippet2"::: ]]> @@ -253,8 +253,8 @@ ## Examples The following code example demonstrates how to create a collection using another of objects as a base. The method returns a read-only , which is detected when the property returns `true`. A new is created using the read-only and the and methods can be called successfully. - [!code-csharp[System.Web.SiteMapNodeCollection_1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx#1)] - [!code-vb[System.Web.SiteMapNodeCollection_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx" id="Snippet1"::: ]]> @@ -298,15 +298,15 @@ The following code example demonstrates how to use the constructor to create a new , and then add elements to it with the method. - [!code-csharp[System.Web.SiteMapNode_2#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs#1)] - [!code-vb[System.Web.SiteMapNode_2#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNode_2/CS/sitemapnode2acs.aspx.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNode_2/VB/sitemapnode2avb.aspx.vb" id="Snippet1"::: The following code example demonstrates a custom site map provider implementation and shows how to use the constructor to create a new and add elements to the with the method. This code example is part of a larger code example provided for the class. - [!code-csharp[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#6](~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs#6)] - [!code-vb[Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1#6](~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb#6)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/CS/simpletextsitemapprovider.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Urtue.Samples.Alexkr.SimpleTextSiteMapProvider_1/VB/simpletextsitemapprovider.vb" id="Snippet6"::: ]]> @@ -415,8 +415,8 @@ ## Examples The following code example demonstrates how to create a modifiable collection, and then add objects to it using the method. - [!code-csharp[System.Web.SiteMapNodeCollection_2#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx#2)] - [!code-vb[System.Web.SiteMapNodeCollection_2#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/CS/webform2smccs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_2/VB/webform2smcvb.aspx" id="Snippet2"::: ]]> @@ -498,8 +498,8 @@ ## Examples The following code example demonstrates how to use the and methods of the class. The code checks two providers, `AspNetXmlSiteMapProvider` and `MyXmlSiteMapProvider`, for child nodes of the root node that are duplicates. - [!code-csharp[System.Web.SiteMapNodeCollection_4#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/cs/sourcecs.aspx#1)] - [!code-vb[System.Web.SiteMapNodeCollection_4#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/vb/sourcevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/cs/sourcecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/vb/sourcevb.aspx" id="Snippet1"::: ]]> @@ -724,8 +724,8 @@ ## Examples The following code example demonstrates how to use the and methods of the class. The code checks two providers, `AspNetXmlSiteMapProvider` and `MyXmlSiteMapProvider`, for child nodes of the root node that are duplicates. - [!code-csharp[System.Web.SiteMapNodeCollection_4#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/cs/sourcecs.aspx#1)] - [!code-vb[System.Web.SiteMapNodeCollection_4#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/vb/sourcevb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/cs/sourcecs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_4/vb/sourcevb.aspx" id="Snippet1"::: ]]> @@ -885,8 +885,8 @@ ## Examples The following code example demonstrates how to use the indexer to retrieve a object from the collection. In this example, a object is removed from its position at the second element of the internal array using the method and is appended to the array with the method. To insert a object at a specific index, instead of appending it to the end of the array, use the method. - [!code-csharp[System.Web.SiteMapNodeCollection_1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx#2)] - [!code-vb[System.Web.SiteMapNodeCollection_1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx" id="Snippet2"::: ]]> @@ -968,8 +968,8 @@ ## Examples The following code example demonstrates how to use the property to test whether a collection is read-only or modifiable. If `siteNodes` is modifiable, `MoveNode` is called on it; otherwise, a clone is created, using `siteNodes` as a base. - [!code-csharp[System.Web.SiteMapNodeCollection_1#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx#1)] - [!code-vb[System.Web.SiteMapNodeCollection_1#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx" id="Snippet1"::: ]]> @@ -1015,8 +1015,8 @@ ## Examples The following code example demonstrates how to use the method to remove a object from a collection, and then append the object to the end of the using the method. If the is read-only, a exception is caught. - [!code-csharp[System.Web.SiteMapNodeCollection_1#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx#2)] - [!code-vb[System.Web.SiteMapNodeCollection_1#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/CS/webform1smccs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapNodeCollection_1/VB/webform1smcvb.aspx" id="Snippet2"::: ]]> diff --git a/xml/System.Web/SiteMapProviderCollection.xml b/xml/System.Web/SiteMapProviderCollection.xml index c8fbe2b3bcb..9727c9f1809 100644 --- a/xml/System.Web/SiteMapProviderCollection.xml +++ b/xml/System.Web/SiteMapProviderCollection.xml @@ -245,8 +245,8 @@ AccessSiteMapProvider Samples.AspNet.Controls.AccessSiteMapProvider ## Examples The following code example demonstrates how to use the property to retrieve the default ASP.NET object from the object that is returned when the collection is accessed. - [!code-csharp[System.Web.SiteMapProviderCollection_2#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapProviderCollection_2/CS/sitemapprov2cs.aspx#1)] - [!code-vb[System.Web.SiteMapProviderCollection_2#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapProviderCollection_2/VB/sitemapprov2vb.aspx#1)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.SiteMapProviderCollection_2/CS/sitemapprov2cs.aspx" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.SiteMapProviderCollection_2/VB/sitemapprov2vb.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web/VirtualPathUtility.xml b/xml/System.Web/VirtualPathUtility.xml index e7f782573df..e18a4e6e071 100644 --- a/xml/System.Web/VirtualPathUtility.xml +++ b/xml/System.Web/VirtualPathUtility.xml @@ -166,8 +166,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#2)] - [!code-vb[System.Web.VirtualPathUtility#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet2"::: ]]> @@ -215,8 +215,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#2)] - [!code-vb[System.Web.VirtualPathUtility#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet2"::: ]]> @@ -261,8 +261,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#2](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#2)] - [!code-vb[System.Web.VirtualPathUtility#2](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#2)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet2"::: ]]> @@ -308,8 +308,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#3)] - [!code-vb[System.Web.VirtualPathUtility#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet3"::: ]]> @@ -357,8 +357,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#3)] - [!code-vb[System.Web.VirtualPathUtility#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet3"::: ]]> @@ -595,8 +595,8 @@ ## Examples The following code example demonstrates how to use the , , and methods. - [!code-csharp[System.Web.VirtualPathUtility#3](~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx#3)] - [!code-vb[System.Web.VirtualPathUtility#3](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx#3)] + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.VirtualPathUtility/cs/virtualpathutilitycs.aspx" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.VirtualPathUtility/vb/virtualpathutilityvb.aspx" id="Snippet3"::: ]]> diff --git a/xml/System.Windows.Media.Effects/ShaderEffect.xml b/xml/System.Windows.Media.Effects/ShaderEffect.xml index 1a36e2c6cab..95c74efb56c 100644 --- a/xml/System.Windows.Media.Effects/ShaderEffect.xml +++ b/xml/System.Windows.Media.Effects/ShaderEffect.xml @@ -63,15 +63,15 @@ ## Examples The following code example shows how to derive from the class. - [!code-csharp[System.Windows.Media.Effects.ShaderEffect#1](~/snippets/csharp/System.Windows/UIElement/Effect/ThresholdEffect.cs#1)] + :::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/Effect/ThresholdEffect.cs" id="Snippet1"::: The following code example shows a shader that corresponds to the previous class. - [!code-csharp[System.Windows.Media.Effects.ShaderEffect#10](~/snippets/csharp/System.Windows/UIElement/Effect/Threshold.fx#10)] + :::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/Effect/Threshold.fx" id="Snippet10"::: The following XAML shows how to use the custom shader effect. - [!code-xaml[System.Windows.Media.Effects.ShaderEffect#1000](~/snippets/csharp/System.Windows/UIElement/Effect/Window1.xaml#1000)] + :::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/Effect/Window1.xaml" id="Snippet1000"::: ]]> diff --git a/xml/System.Xml/XmlDocument.xml b/xml/System.Xml/XmlDocument.xml index 7810a8d92f8..6a3519aadb1 100644 --- a/xml/System.Xml/XmlDocument.xml +++ b/xml/System.Xml/XmlDocument.xml @@ -122,12 +122,12 @@ The following is an example of load-time validation. A document type definition (DTD) validating is passed to the method and a is provided to notify users of any validation errors. In this example a validation error is found, but the document is still loaded. Alternatively, you can define a validating to throw an exception and stop the load process when a validation error is found by not specifying the . For more information about validating XML data, see the Remarks section of the reference page. -[!code-csharp[XmlDocument.cctor#1](~/snippets/csharp/System.Xml/XmlDocument/.ctor/docload.cs#1)] -[!code-vb[XmlDocument.cctor#1](~/snippets/visualbasic/VS_Snippets_Data/XmlDocument.cctor/VB/docload.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/.ctor/docload.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/XmlDocument.cctor/VB/docload.vb" id="Snippet1"::: The example uses the `bookDTD.xml` file as input. -[!code-xml[XmlDocument.cctor#2](~/snippets/xml/VS_Snippets_Data/XmlDocument.cctor/XML/bookdtd.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XmlDocument.cctor/XML/bookdtd.xml" id="Snippet2"::: ]]> @@ -350,8 +350,8 @@ The example uses the `bookDTD.xml` file as input. The following example shows the difference between a deep and shallow clone. - [!code-csharp[Classic WebData XmlDocument.CloneNode Example#1](~/snippets/csharp/System.Xml/XmlDocument/CloneNode/source.cs#1)] - [!code-vb[Classic WebData XmlDocument.CloneNode Example#1](~/snippets/visualbasic/System.Xml/XmlDocument/CloneNode/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CloneNode/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Xml/XmlDocument/CloneNode/source.vb" id="Snippet1"::: ]]> @@ -423,8 +423,8 @@ The following example shows the difference between a deep and shallow clone. The following creates an attribute and adds it to an XML document. - [!code-csharp[Classic WebData XmlDocument.CreateAttribute Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateAttribute/source.cs#1)] - [!code-vb[Classic WebData XmlDocument.CreateAttribute Example#1](~/snippets/visualbasic/System.Xml/XmlDocument/CreateAttribute/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateAttribute/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Xml/XmlDocument/CreateAttribute/source.vb" id="Snippet1"::: ]]> @@ -648,8 +648,8 @@ The following creates an attribute and adds it to an XML document. The following example creates a CDATA node and adds it to the document. - [!code-csharp[Classic WebData XmlDocument.CreateCDataSection Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateCDataSection/source.cs#1)] - [!code-vb[Classic WebData XmlDocument.CreateCDataSection Example#1](~/snippets/visualbasic/System.Xml/XmlDocument/CreateCDataSection/source.vb#1)] + :::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateCDataSection/source.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Xml/XmlDocument/CreateCDataSection/source.vb" id="Snippet1"::: ]]> @@ -722,8 +722,8 @@ The following example creates a CDATA node and adds it to the document. The following example creates a comment and adds it to an XML document. -[!code-csharp[Classic WebData XmlDocument.CreateComment Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateComment/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateComment Example#1](~/snippets/visualbasic/System.Xml/XmlDocument/CreateComment/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateComment/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/System.Xml/XmlDocument/CreateComment/source.vb" id="Snippet1"::: ]]> @@ -857,8 +857,8 @@ The following example creates a comment and adds it to an XML document. The following example adds new nodes to an XML document. -[!code-csharp[Classic WebData XmlDocument.CreateDocumentFragment Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateDocumentFragment/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateDocumentFragment Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateDocumentFragment Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateDocumentFragment/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateDocumentFragment Example/VB/source.vb" id="Snippet1"::: ]]> @@ -944,8 +944,8 @@ The following example adds new nodes to an XML document. The following example creates a DocumentType node and adds it to an XML document. -[!code-csharp[Classic WebData XmlDocument.CreateDocumentType Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateDocumentType/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateDocumentType Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateDocumentType Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateDocumentType/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateDocumentType Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1026,8 +1026,8 @@ The following example creates a DocumentType node and adds it to an XML document The following example creates a new element and adds it to the document. -[!code-csharp[Classic WebData XmlDocument.CreateElement Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateElement Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1211,8 +1211,8 @@ elem=doc.CreateElement("xy", "item", "urn:abc"); The following example adds a new element to the existing XML document. -[!code-csharp[Classic WebData XmlDocument.CreateElement2 Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source1.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateElement2 Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement2 Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source1.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement2 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1289,8 +1289,8 @@ The following example adds a new element to the existing XML document. The following example creates two entity reference nodes and inserts them into an XML document. -[!code-csharp[Classic WebData XmlDocument.CreateEntityReference Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateEntityReference/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateEntityReference Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateEntityReference Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateEntityReference/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateEntityReference Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1557,8 +1557,8 @@ The `nodeTypeString` parameter is case sensitive and must be one of the values i The following example creates a new element and inserts it into the document. -[!code-csharp[Classic WebData XmlDocument.CreateNode1 Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source1.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateNode1 Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode1 Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source1.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode1 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1664,8 +1664,8 @@ The following example creates a new element and inserts it into the document. The following example creates a new element and inserts it into an XML document. -[!code-csharp[Classic WebData XmlDocument.CreateNode Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateNode Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1774,8 +1774,8 @@ The following example creates a new element and inserts it into an XML document. The following example adds a new element to the document. -[!code-csharp[Classic WebData XmlDocument.CreateNode2 Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source2.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateNode2 Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode2 Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateNode/source2.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateNode2 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1851,8 +1851,8 @@ The following example adds a new element to the document. The following example creates a ProcessingInstruction node and adds it to the document. -[!code-csharp[Classic WebData XmlDocument.CreateProcessingInstruction Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateProcessingInstruction/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateProcessingInstruction Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateProcessingInstruction Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateProcessingInstruction/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateProcessingInstruction Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1925,8 +1925,8 @@ The following example creates a ProcessingInstruction node and adds it to the do The following example adds significant white space to the document. -[!code-csharp[Classic WebData XmlDocument.CreateSignificantWhitespace Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateSignificantWhitespace/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateSignificantWhitespace Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateSignificantWhitespace Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateSignificantWhitespace/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateSignificantWhitespace Example/VB/source.vb" id="Snippet1"::: ]]> @@ -1999,8 +1999,8 @@ The following example adds significant white space to the document. The following example creates a new element and adds it to the document. -[!code-csharp[Classic WebData XmlDocument.CreateElement Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateElement Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2073,8 +2073,8 @@ The following example creates a new element and adds it to the document. The following example adds white space to the document. -[!code-csharp[Classic WebData XmlDocument.CreateWhitespace Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateWhitespace/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateWhitespace Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateWhitespace Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateWhitespace/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateWhitespace Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2164,8 +2164,8 @@ The following example adds white space to the document. The following example creates an XML declaration and adds it to the document. -[!code-csharp[Classic WebData XmlDocument.CreateXmlDeclaration Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateXmlDeclaration/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateXmlDeclaration Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateXmlDeclaration Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateXmlDeclaration/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateXmlDeclaration Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2230,8 +2230,8 @@ The following example creates an XML declaration and adds it to the document. The following example displays the root element of the XML document. -[!code-csharp[Classic WebData XmlDocument.DocumentElement Example#1](~/snippets/csharp/System.Xml/XmlDocument/Overview/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.DocumentElement Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.DocumentElement Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Overview/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.DocumentElement Example/VB/source.vb" id="Snippet1"::: **Output:** @@ -2304,8 +2304,8 @@ The following example displays the root element of the XML document. The following example gets and displays the DOCTYPE declaration for the document. -[!code-csharp[Classic WebData XmlDocument.DocumentType Example#1](~/snippets/csharp/System.Xml/XmlDocument/DocumentType/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.DocumentType Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.DocumentType Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/DocumentType/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.DocumentType Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2377,8 +2377,8 @@ The following example gets and displays the DOCTYPE declaration for the document The following example uses the `GetElementById` method. -[!code-csharp[Classic WebData XmlDocument.GetElementById Example#1](~/snippets/csharp/System.Xml/XmlDocument/GetElementById/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.GetElementById Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.GetElementById Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/GetElementById/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.GetElementById Example/VB/source.vb" id="Snippet1"::: The example uses the file, `ids.xml`, as input. @@ -2472,12 +2472,12 @@ The following example uses the `GetElementById` method. The following example creates a `XmlDocument` object and uses the `GetElementsByTagName` method and the resulting object to display all the book titles. -[!code-csharp[Classic WebData XmlDocument.GetElementsByTagName Example#1](~/snippets/csharp/System.Xml/XmlDocument/Overview/source1.cs#1)] -[!code-vb[Classic WebData XmlDocument.GetElementsByTagName Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.GetElementsByTagName Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Overview/source1.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.GetElementsByTagName Example/VB/source.vb" id="Snippet1"::: The example uses the `books.xml` file as input. - [!code-xml[Classic WebData XslTransform.Transform7 Example#2](~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml#2)] + :::code language="xml" source="~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml" id="Snippet2"::: ]]> @@ -2606,8 +2606,8 @@ The following example creates a `XmlDocument` object and uses the `GetElementsBy The following example creates a new `XmlDocument` using another document's implementation. -[!code-csharp[Classic WebData XmlDocument.Implementation Example#1](~/snippets/csharp/System.Xml/XmlDocument/Implementation/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.Implementation Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Implementation Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Implementation/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Implementation Example/VB/source.vb" id="Snippet1"::: ]]> @@ -2703,12 +2703,12 @@ The following example creates a new `XmlDocument` using another document's imple The following example imports a book node from a second XML document into the original XML document. -[!code-csharp[Classic WebData XmlDocument.ImportNode Example#1](~/snippets/csharp/System.Xml/XmlDocument/ImportNode/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.ImportNode Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.ImportNode Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/ImportNode/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.ImportNode Example/VB/source.vb" id="Snippet1"::: The example uses the file, `books.xml`, as input. -[!code-xml[Classic WebData XslTransform.Transform7 Example#2](~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml" id="Snippet2"::: ]]> @@ -2960,8 +2960,8 @@ The example uses the file, `books.xml`, as input. The following example shows how to use the `IsReadOnly` property. -[!code-csharp[Classic WebData XmlDocument.IsReadOnly Example#1](~/snippets/csharp/System.Xml/XmlDocument/IsReadOnly/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.IsReadOnly Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.IsReadOnly Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/IsReadOnly/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.IsReadOnly Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3106,8 +3106,8 @@ The following example shows how to use the `IsReadOnly` property. The following example uses the class to load a string of XML data into the `XmlDocument` object. -[!code-csharp[Classic WebData XmlDocument.CreateElement2 Example#1](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source1.cs#1)] -[!code-vb[Classic WebData XmlDocument.CreateElement2 Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement2 Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source1.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.CreateElement2 Example/VB/source.vb" id="Snippet1"::: ]]> @@ -3289,12 +3289,12 @@ The following example uses the class to load a str The following example loads the last book node of the `books.xml` file into the XML document. -[!code-csharp[Classic WebData XmlDocument.Load2 Example#1](~/snippets/csharp/System.Xml/XmlDocument/Load/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.Load2 Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Load2 Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Load/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Load2 Example/VB/source.vb" id="Snippet1"::: The example uses the file, `books.xml`, as input. -[!code-xml[Classic WebData XslTransform.Transform7 Example#2](~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/Classic WebData XslTransform.Transform7 Example/XML/books.xml" id="Snippet2"::: ]]> @@ -3373,8 +3373,8 @@ The example uses the file, `books.xml`, as input. The following example loads XML into an `XmlDocument` object and saves it out to a file. -[!code-csharp[Classic WebData XmlDocument.LoadXml Example#1](~/snippets/csharp/System.Xml/XmlDocument/LoadXml/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.LoadXml Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.LoadXml Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/LoadXml/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.LoadXml Example/VB/source.vb" id="Snippet1"::: ]]> @@ -4106,12 +4106,12 @@ The following example loads XML into an `XmlDocument` object and saves it out to The following example shows how to strip white space from a file. -[!code-csharp[Classic WebData XmlDocument.PreserveWhitespace Example#1](~/snippets/csharp/System.Xml/XmlDocument/PreserveWhitespace/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.PreserveWhitespace Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.PreserveWhitespace Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/PreserveWhitespace/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.PreserveWhitespace Example/VB/source.vb" id="Snippet1"::: The example uses the file `book.xml` as input. -[!code-xml[Classic WebData XmlDocument.PreserveWhitespace Example#2](~/snippets/xml/VS_Snippets_Data/Classic WebData XmlDocument.PreserveWhitespace Example/XML/source.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/Classic WebData XmlDocument.PreserveWhitespace Example/XML/source.xml" id="Snippet2"::: ]]> @@ -4190,12 +4190,12 @@ while (reader.MoveToNextAttribute()) The following example uses `ReadNode` to create a new node and then inserts the new node into the document. -[!code-csharp[Classic WebData XmlDocument.ReadNode Example#1](~/snippets/csharp/System.Xml/XmlDocument/ReadNode/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.ReadNode Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.ReadNode Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/ReadNode/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.ReadNode Example/VB/source.vb" id="Snippet1"::: The example uses the file, `cd.xml`, as input. -[!code-xml[Classic WebData XmlDocument.ReadNode Example#2](~/snippets/xml/VS_Snippets_Data/Classic WebData XmlDocument.ReadNode Example/XML/source.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/Classic WebData XmlDocument.ReadNode Example/XML/source.xml" id="Snippet2"::: ]]> @@ -4422,8 +4422,8 @@ doc.Save(Console.Out); The following example loads XML into an XmlDocument object, modifies it, and then saves it to a file named data.xml. -[!code-csharp[Classic WebData XmlDocument.Save Example#1](~/snippets/csharp/System.Xml/XmlDocument/Save/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.Save Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Save Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Save/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.Save Example/VB/source.vb" id="Snippet1"::: The data.xml file will contain the following XML: `wrench10.95`. @@ -4509,8 +4509,8 @@ doc.Save(Console.Out); The following example loads XML into an `XmlDocument` object and saves it out to a file. -[!code-csharp[Classic WebData XmlDocument.LoadXml Example#1](~/snippets/csharp/System.Xml/XmlDocument/LoadXml/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.LoadXml Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.LoadXml Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/LoadXml/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.LoadXml Example/VB/source.vb" id="Snippet1"::: ]]> @@ -4706,14 +4706,14 @@ Consider the following points when using the method. The example creates an that contains an associated XSD schema using the and objects. The example then uses the class to incorrectly modify the typed value of an element in the XML document generating a schema validation error. -[!code-csharp[XPathValidation#1](~/snippets/csharp/System.Xml/XmlDocument/Validate/XPathValidation.cs#1)] -[!code-vb[XPathValidation#1](~/snippets/visualbasic/VS_Snippets_Data/XPathValidation/VB/XPathValidation.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/Validate/XPathValidation.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/XPathValidation/VB/XPathValidation.vb" id="Snippet1"::: The example takes the `contosoBooks.xml` and `contosoBooks.xsd` files as input. -[!code-xml[XPathXMLExamples#2](~/snippets/xml/VS_Snippets_Data/XPathXMLExamples/XML/contosoBooks.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XPathXMLExamples/XML/contosoBooks.xml" id="Snippet2"::: -[!code-xml[XPathXMLExamples#3](~/snippets/xml/VS_Snippets_Data/XPathXMLExamples/XML/contosoBooks.xsd#3)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XPathXMLExamples/XML/contosoBooks.xsd" id="Snippet3"::: ]]> @@ -4859,8 +4859,8 @@ The example takes the `contosoBooks.xml` and `contosoBooks.xsd` files as input. The following example displays the document. -[!code-csharp[Classic WebData XmlDocument.WriteContentTo Example#1](~/snippets/csharp/System.Xml/XmlDocument/WriteContentTo/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.WriteContentTo Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.WriteContentTo Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/WriteContentTo/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.WriteContentTo Example/VB/source.vb" id="Snippet1"::: ]]> @@ -4924,8 +4924,8 @@ The following example displays the document. The following example displays the document. -[!code-csharp[Classic WebData XmlDocument.WriteTo Example#1](~/snippets/csharp/System.Xml/XmlDocument/WriteTo/source.cs#1)] -[!code-vb[Classic WebData XmlDocument.WriteTo Example#1](~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.WriteTo Example/VB/source.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/WriteTo/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/Classic WebData XmlDocument.WriteTo Example/VB/source.vb" id="Snippet1"::: ]]> @@ -5012,18 +5012,18 @@ The following example displays the document. The following example loads an XML document which includes a reference to a DTD file. The `XmlResolver` property is used to set the credentials necessary to access the network resource. -[!code-csharp[XmlDocument.XmlResolver#1](~/snippets/csharp/System.Xml/XmlDocument/XmlResolver/docresolver.cs#1)] -[!code-vb[XmlDocument.XmlResolver#1](~/snippets/visualbasic/VS_Snippets_Data/XmlDocument.XmlResolver/VB/docresolver.vb#1)] +:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/XmlResolver/docresolver.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/XmlDocument.XmlResolver/VB/docresolver.vb" id="Snippet1"::: The example uses the following data files as input. `book5.xml` -[!code-xml[XmlDocument.XmlResolver#2](~/snippets/xml/VS_Snippets_Data/XmlDocument.XmlResolver/XML/book5.xml#2)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XmlDocument.XmlResolver/XML/book5.xml" id="Snippet2"::: `books.dtd` -[!code-xml[XmlDocument.XmlResolver#3](~/snippets/xml/VS_Snippets_Data/XmlDocument.XmlResolver/XML/books.dtd#3)] +:::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XmlDocument.XmlResolver/XML/books.dtd" id="Snippet3"::: ]]>