From 9acd94d2c604799941d8069f5d5918e61539d81a Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 18 Jun 2025 17:04:36 +0200 Subject: [PATCH 1/4] delete code example text from obsolete types --- .../PassportAuthentication.xml | 34 +- xml/System.Web.Mail/MailAttachment.xml | 16 +- xml/System.Web.Mail/MailMessage.xml | 150 +--- xml/System.Web.Mail/SmtpMail.xml | 70 +- xml/System.Web.Mobile/MobileCapabilities.xml | 35 - .../MobileFormsAuthentication.xml | 24 - xml/System.Web.Security/PassportIdentity.xml | 758 ++++++++---------- .../DataBindingCollectionConverter.xml | 27 +- .../XhtmlCssHandler.xml | 29 +- .../AdRotator.xml | 68 -- xml/System.Web.UI.MobileControls/Calendar.xml | 65 -- xml/System.Web.UI.MobileControls/Command.xml | 56 +- .../CompareValidator.xml | 11 - .../CustomValidator.xml | 22 - .../DeviceSpecific.xml | 47 -- .../DeviceSpecificChoice.xml | 17 +- .../DeviceSpecificChoiceCollection.xml | 30 +- xml/System.Web.UI.MobileControls/Form.xml | 87 +- xml/System.Web.UI.MobileControls/Image.xml | 30 +- xml/System.Web.UI.MobileControls/List.xml | 174 ++-- .../ListCommandEventArgs.xml | 29 +- .../ListDataBindEventArgs.xml | 23 +- .../LoadItemsEventArgs.xml | 11 - .../MobileControl.xml | 13 - .../MobileListItem.xml | 150 ++-- .../MobileListItemCollection.xml | 158 ++-- .../MobilePage.xml | 22 - .../ObjectList.xml | 94 --- .../ObjectListCommand.xml | 62 +- .../PagedControl.xml | 134 ++-- .../PagerStyle.xml | 69 -- xml/System.Web.UI.MobileControls/Panel.xml | 48 +- .../PhoneCall.xml | 22 +- .../RegularExpressionValidator.xml | 11 - .../RequiredFieldValidator.xml | 11 - .../SelectionList.xml | 47 -- xml/System.Web.UI.MobileControls/Style.xml | 282 +++---- .../StyleSheet.xml | 9 - .../TemplateContainer.xml | 19 - xml/System.Web.UI.MobileControls/TextBox.xml | 8 - xml/System.Web.UI.MobileControls/TextView.xml | 46 -- .../ValidationSummary.xml | 21 - xml/System.Web/AspNetHostingPermission.xml | 46 +- 43 files changed, 845 insertions(+), 2240 deletions(-) diff --git a/xml/System.Web.Configuration/PassportAuthentication.xml b/xml/System.Web.Configuration/PassportAuthentication.xml index 66d3f24ecc3..aa8754593f7 100644 --- a/xml/System.Web.Configuration/PassportAuthentication.xml +++ b/xml/System.Web.Configuration/PassportAuthentication.xml @@ -33,20 +33,6 @@ > [!NOTE] > The class can write information into the related section of the configuration file at machine, site, or application level only. Any attempt to write in a configuration file at a different level in the hierarchy will result in an error message generated by the parser. You can use this class to read configuration information at any level in the hierarchy. - - -## Examples - The following code example shows how to obtain the object from the configuration file of an existing Web application. Also shown is a configuration example. - -```xml - - - -``` - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/CS/passportauthentication.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/VB/passportauthentication.vb" id="Snippet1"::: - ]]> @@ -76,17 +62,7 @@ Initializes a new instance of the class. - - object. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/CS/passportauthentication.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/VB/passportauthentication.vb" id="Snippet2"::: - - ]]> - + To be added. @@ -180,14 +156,6 @@ ## Remarks The specifies the URL of the page to which the request must be redirected if Passport authentication is required and the user has not signed on using Passport authentication. - - -## Examples - The following code example shows how to use the property. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/CS/passportauthentication.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/VB/passportauthentication.vb" id="Snippet3"::: - ]]> diff --git a/xml/System.Web.Mail/MailAttachment.xml b/xml/System.Web.Mail/MailAttachment.xml index ce59fa3b21e..6ba1ec2dbda 100644 --- a/xml/System.Web.Mail/MailAttachment.xml +++ b/xml/System.Web.Mail/MailAttachment.xml @@ -56,17 +56,11 @@ The name of the attachment file. Initializes a new instance of the class with the specified file name for the attachment. Sets the property to by default. Recommended alternative: . - diff --git a/xml/System.Web.Mail/MailMessage.xml b/xml/System.Web.Mail/MailMessage.xml index d27c9814e5a..699936881a7 100644 --- a/xml/System.Web.Mail/MailMessage.xml +++ b/xml/System.Web.Mail/MailMessage.xml @@ -22,21 +22,8 @@ - Provides properties and methods for constructing an email message. Recommended alternative: . - - class. - -> [!IMPORTANT] -> This control 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-aspx-csharp[System.Web.Mail.MailMessage#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage/CS/mailformcs.aspx#1)] - [!code-aspx-vb[System.Web.Mail.MailMessage#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage/VB/mailformvb.aspx#1)] - - ]]> - + Provides properties and methods for constructing an email message. + To be added. @@ -54,7 +41,7 @@ - Initializes a new instance of the class. Recommended alternative: . + Initializes a new instance of the class. To be added. @@ -82,22 +69,9 @@ System.Collections.IList - Specifies the collection of attachments that are transmitted with the message. Recommended alternative: . + Specifies the collection of attachments that are transmitted with the message. An collection of objects. - - for an example of usage. - - - -## Examples - [!code-csharp[System.Web.Mail.MailMessage.Attachments#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Attachments/CS/attachmentsample.cs#1)] - [!code-vb[System.Web.Mail.MailMessage.Attachments#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Attachments/VB/attachmentsample.vb#1)] - - ]]> - + To be added. @@ -128,7 +102,7 @@ System.String - Gets or sets a semicolon-delimited list of email addresses that receive a blind carbon copy (BCC) of the email message. Recommended alternative: . + Gets or sets a semicolon-delimited list of email addresses that receive a blind carbon copy (BCC) of the email message. A semicolon-delimited list of email addresses that receive a blind carbon copy (BCC) of the email message. ) recipients do not see the addresses in the `Bcc` field. - - -## Examples - [!code-csharp[System.Web.Mail.MailMessage.Bcc#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Bcc/CS/systemwebmailmailmessagebcc.cs#1)] - [!code-vb[System.Web.Mail.MailMessage.Bcc#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Bcc/VB/systemwebmailmailmessagebcc.vb#1)] - ]]> @@ -176,7 +144,7 @@ System.String - Gets or sets the body of the email message. Recommended alternative: . + Gets or sets the body of the email message. The body of the email message. To be added. @@ -209,17 +177,9 @@ System.Text.Encoding - Gets or sets the encoding type of the body of the email message. Recommended alternative: . + Gets or sets the encoding type of the body of the email message. One of the values that indicates the encoding type of the body of the email message. - - - + To be added. @@ -250,17 +210,9 @@ System.Web.Mail.MailFormat - Gets or sets the content type of the body of the email message. Recommended alternative: . + Gets or sets the content type of the body of the email message. One of the values. - - - + To be added. @@ -291,7 +243,7 @@ System.String - Gets or sets a semicolon-delimited list of email addresses that receive a carbon copy (CC) of the email message. Recommended alternative: . + Gets or sets a semicolon-delimited list of email addresses that receive a carbon copy (CC) of the email message. A semicolon-delimited list of email addresses that receive a carbon copy (CC) of the email message. @@ -333,21 +279,13 @@ System.Collections.IDictionary - Gets a collection of objects that map to Microsoft Collaboration Data Objects (CDO) fields. Recommended alternative: . + Gets a collection of objects that map to Microsoft Collaboration Data Objects (CDO) fields. An collection of objects that map to Collaboration Data Objects (CDO) fields. property is used to set extended properties for Collaboration Data Objects (CDO). For more information about CDO, see [Collaboration Data Objects](https://learn.microsoft.com/archive/msdn-magazine/2000/june/collaboration-data-objects-send-microsoft-exchange-appointment-reminders-to-your-pager-using-cdo) and [Configuration CoClass](https://learn.microsoft.com/previous-versions/office/developer/exchange-server-2003/ms870485(v=exchg.65)). - - - -## Examples - The following code example demonstrates using the property to send your user name and password to a Simple Mail Transfer Protocol (SMTP) server for authentication. - - [!code-csharp[System.Web.Mail.MailMessage.Fields#1](~/snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Fields/CS/MailMessageFieldscs.aspx#1)] - [!code-vb[System.Web.Mail.MailMessage.Fields#1](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Fields/VB/MailMessageFieldsvb.aspx#1)] + The property is used to set extended properties for Collaboration Data Objects (CDO). For more information about CDO, see [Collaboration Data Objects](https://learn.microsoft.com/archive/msdn-magazine/2000/june/collaboration-data-objects-send-microsoft-exchange-appointment-reminders-to-your-pager-using-cdo). ]]> @@ -381,17 +319,9 @@ System.String - Gets or sets the email address of the sender. Recommended alternative: . + Gets or sets the email address of the sender. The sender's email address. - - - + To be added. @@ -418,7 +348,7 @@ System.Collections.IDictionary - Specifies the custom headers that are transmitted with the email message. Recommended alternative: . + Specifies the custom headers that are transmitted with the email message. An collection of custom headers. To be added. @@ -451,17 +381,9 @@ System.Web.Mail.MailPriority - Gets or sets the priority of the email message. Recommended alternative: . + Gets or sets the priority of the email message. One of the values. - - - + To be added. @@ -492,7 +414,7 @@ System.String - Gets or sets the subject line of the email message. Recommended alternative: . + Gets or sets the subject line of the email message. The subject line of the email message. To be added. @@ -525,7 +447,7 @@ System.String - Gets or sets a semicolon-delimited list of recipient email addresses. Recommended alternative: . + Gets or sets a semicolon-delimited list of recipient email addresses. A semicolon-delimited list of email addresses. @@ -571,17 +487,9 @@ System.String - Gets or sets the HTTP header, the URL base of all relative URLs used within the HTML-encoded body of the email message. Recommended alternative: . + Gets or sets the HTTP header, the URL base of all relative URLs used within the HTML-encoded body of the email message. The URL base. - - - + To be added. @@ -612,17 +520,9 @@ System.String - Gets or sets the HTTP header for the email message. Recommended alternative: . + Gets or sets the HTTP header for the email message. The header. - - - + To be added. diff --git a/xml/System.Web.Mail/SmtpMail.xml b/xml/System.Web.Mail/SmtpMail.xml index 6d1f599d645..1ea3b1e5f6e 100644 --- a/xml/System.Web.Mail/SmtpMail.xml +++ b/xml/System.Web.Mail/SmtpMail.xml @@ -24,25 +24,13 @@ Provides properties and methods for sending messages using the Collaboration Data Objects for Windows 2000 (CDOSYS) message component. Recommended alternative: . - namespace can be used from ASP.NET or from any managed application. - - If the property is not set, mail is by default queued on a Windows 2000 system, ensuring that the calling program does not block network traffic. If the property is set, the mail is delivered directly to the specified server. - - - -## Examples - The following example can be compiled to a console application that is used to send email from a command line. If you compile the example to a file named MailMessage.exe, use the executable file to send email as follows: - -``` -MailMessage to@contoso.com from@contoso.com test hello -``` - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.SmtpMail/CS/systemwebmailsmtpmail.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.SmtpMail/VB/systemwebmailsmtpmail.vb" id="Snippet1"::: - + namespace can be used from ASP.NET or from any managed application. + + If the property is not set, mail is by default queued on a Windows 2000 system, ensuring that the calling program does not block network traffic. If the property is set, the mail is delivered directly to the specified server. + ]]> @@ -79,17 +67,7 @@ MailMessage to@contoso.com from@contoso.com test hello The to send. Sends an email message using arguments supplied in the properties of the class. Recommended alternative: . - - to send an email message using . - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic SmtpMail.Send Example/CS/smtpmailsend.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic SmtpMail.Send Example/VB/smtpmailsend.vb" id="Snippet1"::: - - ]]> - + To be added. The mail cannot be sent. The method requires the Microsoft Windows NT, Windows 2000, or Windows XP operating system. @@ -123,17 +101,7 @@ MailMessage to@contoso.com from@contoso.com test hello The subject line of the email message. The body of the email message. Sends an email message using the specified destination parameters. Recommended alternative: . - - . - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic SmtpMail.Send Example/CS/smtpmailsend.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic SmtpMail.Send Example/VB/smtpmailsend.vb" id="Snippet2"::: - - ]]> - + To be added. The method requires the Microsoft Windows NT, Windows 2000, or Windows XP operating system. @@ -164,19 +132,13 @@ MailMessage to@contoso.com from@contoso.com test hello Gets or sets the name of the SMTP relay mail server to use to send email messages. Recommended alternative: . The name of the email relay server. - diff --git a/xml/System.Web.Mobile/MobileCapabilities.xml b/xml/System.Web.Mobile/MobileCapabilities.xml index 51bc8aacece..e8029272851 100644 --- a/xml/System.Web.Mobile/MobileCapabilities.xml +++ b/xml/System.Web.Mobile/MobileCapabilities.xml @@ -31,41 +31,6 @@ You can use the Browser property of the object to point to an instance of a object, which can then be used to read the capabilities of the requesting browser and device. - - -## Examples - During the page load, the object obtains the capabilities through the property as previously discussed. The and the properties of the object report back to the browser by setting properties on the object and also by programmatically setting the `Text` property of certain controls on the page. - -```csharp -<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" - Language="c#" %> - - - - - -``` - ]]> diff --git a/xml/System.Web.Mobile/MobileFormsAuthentication.xml b/xml/System.Web.Mobile/MobileFormsAuthentication.xml index 812e9f2c309..a4b9bb186a8 100644 --- a/xml/System.Web.Mobile/MobileFormsAuthentication.xml +++ b/xml/System.Web.Mobile/MobileFormsAuthentication.xml @@ -29,14 +29,6 @@ ## Remarks This helper class is designed to assist with writing authenticated mobile Web sites. The class objects provide mobile device-compatible versions of the ASP.NET class methods, and . For more information on securing your Web application, see [Basic Security Practices for Web Applications](https://learn.microsoft.com/previous-versions/aspnet/zdh19h94(v=vs.100)). - - -## Examples - The following code example shows a login.aspx page. The authentication is validated using the function. The class relies on membership providers to communicate with a data source. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileFormsAuthentication/CS/MobileFormsAuth.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormsAuthentication/VB/MobileFormsAuth.aspx" id="Snippet1"::: - ]]> @@ -86,14 +78,6 @@ ## Remarks The methods create an encrypted string from the authentication cookie and append it to the redirecting URL of the originating request. A client-side redirect is then issued for that URL. This can be used to work around the limitations of certain mobile devices that either do not support cookies, or support cookies that are too small for storing authentication information in a secure manner. - - -## Examples - The following example uses the method to send an authenticated user to the originally requested URL. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileFormsAuthentication/CS/MobileFormsAuth.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormsAuthentication/VB/MobileFormsAuth.aspx" id="Snippet1"::: - ]]> Basic Security Practices for Web Applications @@ -134,14 +118,6 @@ ## Remarks The methods create an encrypted string from the authentication cookie and append it to the redirecting URL of the originating request. A client-side redirect is then issued for that URL. This can be used to work around the limitations of certain mobile devices that either do not support cookies, or support cookies that are too small for storing authentication information in a secure manner. - - -## Examples - The following example demonstrates how to use the method to send the authenticated user back to the URL that was originally requested. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileFormsAuthentication/CS/MobileFormsAuth.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormsAuthentication/VB/MobileFormsAuth.aspx" id="Snippet1"::: - ]]> Basic Security Practices for Web Applications diff --git a/xml/System.Web.Security/PassportIdentity.xml b/xml/System.Web.Security/PassportIdentity.xml index 98274685c27..c6d2f255f90 100644 --- a/xml/System.Web.Security/PassportIdentity.xml +++ b/xml/System.Web.Security/PassportIdentity.xml @@ -36,19 +36,11 @@ Provides a class to be used by . It provides a way for an application to access the method. This class cannot be inherited. This class is deprecated. - @@ -70,11 +62,11 @@ Initializes a new instance of the class. This class is deprecated. - @@ -103,11 +95,11 @@ Gets the type of authentication used to identify the user. This class is deprecated. The string "Passport". - @@ -149,17 +141,11 @@ Returns a string containing the Login server URL for a member, as well as with optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as optional information sent to the Login server in the query string. - @@ -195,11 +181,11 @@ Returns a string containing the Login server URL for a member, along with optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -243,11 +229,11 @@ Returns the authentication server URL for a member. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -291,11 +277,11 @@ Returns a string containing the Login server URL for a member, along with the optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -337,17 +323,11 @@ Returns a string containing the Login server URL for a member, as well as optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as optional information sent to the Login server in the query string. - @@ -383,11 +363,11 @@ Returns a string containing the Login server URL for a member, as well as optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -431,11 +411,11 @@ Returns a string containing the Login server URL for a member, as well as the optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -479,11 +459,11 @@ Retrieves a string containing the Login server URL for a member, as well as the optional information sent to the Login server in the query string. This class is deprecated. The Login server URL for a member, as well as the optional information sent to the Login server in the query string. - @@ -519,11 +499,11 @@ Compresses data. This class is deprecated. The compressed data. - @@ -551,11 +531,11 @@ if the key used for encryption and decryption is valid and if the Passport Manager is in a valid state for encryption; otherwise, . - @@ -585,11 +565,11 @@ Sets the key being used for Passport encryption and decryption. This class is deprecated. An integer result code. - @@ -619,11 +599,11 @@ Sets the key being used for Passport encryption and decryption by referring to the site-name label assigned to that key when the key was first installed. This class is deprecated. An integer result code. - @@ -659,11 +639,11 @@ Decompresses data that has been compressed by the method. This class is deprecated. The decompressed data. - @@ -699,11 +679,11 @@ Decrypts data using the Passport participant key for the current site. This class is deprecated. Data decrypted using the Passport participant key for the current site. - @@ -739,11 +719,11 @@ Encrypts data using the Passport participant key for the current site. This class is deprecated. Data encrypted using the Passport participant key for the current site. - @@ -769,11 +749,11 @@ Gets a value indicating the error state associated with the current Passport ticket. This class is deprecated. A 32-bit signed integer indicating the current error state. - @@ -826,11 +806,11 @@ Gets the contents of a registry key under the HKLM\SW\Microsoft\Passport hive. This class is deprecated. The contents of the registry key. - @@ -864,11 +844,11 @@ Provides information for a Passport domain by querying the Passport manager for the requested domain attribute. This class is deprecated. A string representing the requested attribute. - @@ -898,17 +878,11 @@ Returns the Passport domain from the member name string. This class is deprecated. The Passport domain for the specified member. - @@ -935,11 +909,11 @@ if a connection is coming back from the Passport server (logon, update, or registration) and if the Passport data contained on the query string is valid; otherwise, . - @@ -952,11 +926,11 @@ Indicates whether the user is authenticated by a Passport authority. This class is deprecated. - @@ -991,11 +965,11 @@ if the user is authenticated by a Passport authority; otherwise, . - @@ -1025,30 +999,20 @@ Specifies the interval during which members must have last logged on to the calling domain. A value of -1 indicates that Passport should use the default value, 0 represents , and 1 represents . Determines how the parameter is used. A value of -1 indicates that Passport should use the default value, 0 represents , and 1 represents . - Enables checking for an encrypted logon. A value of -1 indicates that Passport should use the default value, 0 represents , and 1 represents . - - A value of 10 or 100 for Passport version 2.1 Login servers specify SecureLevel 10 or 100 for the Passport Manager IsAuthenticated method. See the Passport version 2.1 SDK documentation for more information. - + Enables checking for an encrypted logon. A value of -1 indicates that Passport should use the default value, 0 represents , and 1 represents . + + A value of 10 or 100 for Passport version 2.1 Login servers specify SecureLevel 10 or 100 for the Passport Manager IsAuthenticated method. See the Passport version 2.1 SDK documentation for more information. + SSL sign-in is not available as an option for Passport version 1.4 Login servers. The value of is ignored at the server. Indicates whether the user is authenticated by a Passport authority. This class is deprecated. if the user is authenticated by a central site responsible for Passport authentication; otherwise, . - @@ -1090,11 +1054,11 @@ Logs the user on, either by generating a 302 redirect URL or initiating a Passport-aware client authentication exchange. This class is deprecated. A string representing the Passport Login Challenge. - @@ -1130,11 +1094,11 @@ Logs the user on by outputting the appropriate headers to either a 302 redirect URL or the initiation of a Passport-aware client authentication exchange. This class is deprecated. A string representing the Passport Login Challenge. - @@ -1180,11 +1144,11 @@ Logs the user on, either by generating a 302 redirect URL or initiating a Passport-aware client authentication exchange. This class is deprecated. A string representing the Passport Login Challenge. - @@ -1214,11 +1178,11 @@ Gets a specific Passport logon option. This class is deprecated. The Passport logon option . - @@ -1248,11 +1212,11 @@ Returns Passport profile information for the specified profile attribute. This class is deprecated. The value of the Passport profile attribute specified by the parameter. - @@ -1283,11 +1247,11 @@ if the Passport profile flag is set in this user's profile; otherwise, . - @@ -1318,21 +1282,11 @@ if the profile attribute exists in this user's profile; otherwise, . - @@ -1359,17 +1313,11 @@ if the Passport member's ticket indicates that the password was saved on the Passport logon page the last time the ticket was refreshed; otherwise, . - @@ -1396,19 +1344,11 @@ if the query string includes a Passport ticket as a cookie; otherwise, . - @@ -1443,11 +1383,11 @@ if full consent is granted in this user's profile. - @@ -1473,11 +1413,11 @@ Gets the Passport Unique Identifier (PUID) for the currently authenticated user, in hexadecimal form. This class is deprecated. The PUID for the currently authenticated user, in hexadecimal form. - @@ -1513,17 +1453,11 @@ if the user is authenticated against a central site responsible for Passport authentication; otherwise, . - @@ -1553,11 +1487,11 @@ Gets Passport profile attributes. This class is deprecated. The Passport profile attribute. - @@ -1570,11 +1504,11 @@ Logs the user on, either by generating a 302 redirect URL or by initiating a Passport-aware client authentication exchange. This class is deprecated. - @@ -1607,11 +1541,11 @@ Logs the user on, either by generating a 302 redirect URL or initiating a Passport-aware client authentication exchange. This class is deprecated. An integer result code. - @@ -1647,11 +1581,11 @@ Logs the user on, either by generating a 302 redirect URL or initiating a Passport-aware client authentication exchange. This class is deprecated. An integer result code. - @@ -1698,19 +1632,11 @@ Logs the user on, either by generating a 302 redirect URL or by initiating a Passport-aware client authentication exchange. This class is deprecated. An integer result code. - @@ -1756,11 +1682,11 @@ Logs the user on, either by generating a 302 redirect URL or initiating a Passport-aware client authentication exchange. This class is deprecated. An integer result code. - @@ -1773,11 +1699,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. - @@ -1810,17 +1736,11 @@ Returns an HTML fragment containing an image tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -1856,11 +1776,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -1906,11 +1826,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -1956,11 +1876,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -1973,11 +1893,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. - @@ -2010,17 +1930,11 @@ Returns an HTML fragment containing an image tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -2056,11 +1970,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -2106,11 +2020,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -2156,11 +2070,11 @@ Returns an HTML fragment containing an HTML <img> tag for a Passport link. This class is deprecated. An HTML fragment containing an image tag for a Passport link. - @@ -2173,11 +2087,11 @@ Returns the Passport logout URL string. This class is deprecated. - @@ -2210,11 +2124,11 @@ Returns the Passport logout URL string. This class is deprecated. The Passport logout URL string. - @@ -2252,11 +2166,11 @@ Returns the Passport logout URL string using the specified parameters. This class is deprecated. The Passport logout URL string. - @@ -2285,17 +2199,11 @@ Gets the name of the current user. This class is deprecated. The name of the current user, which is the Passport Unique Identifier (PUID). - @@ -2326,11 +2234,11 @@ The value to set. Sets a specific Passport logon option. This class is deprecated. - @@ -2359,17 +2267,11 @@ An HTML fragment containing an image for the user to click on to sign out. Logs off the given Passport member from the current session. This class is deprecated. - @@ -2397,11 +2299,11 @@ Releases all resources used by the class. This class is deprecated. - @@ -2431,11 +2333,11 @@ Gets information on a specific attribute of the Passport authentication ticket. This class is deprecated. An object representing an attribute of the Passport authentication ticket. - @@ -2461,17 +2363,11 @@ Gets the time, in seconds, since the last ticket was issued or refreshed. This class is deprecated. The time, in seconds, since the last ticket was issued or refreshed. - @@ -2497,17 +2393,11 @@ Gets the time, in seconds, since a member's logon to the Passport logon server. This class is deprecated. The time, in seconds, since a member's logon to the Passport logon server. - diff --git a/xml/System.Web.UI.Design/DataBindingCollectionConverter.xml b/xml/System.Web.UI.Design/DataBindingCollectionConverter.xml index 035497d4154..d45a0261d67 100644 --- a/xml/System.Web.UI.Design/DataBindingCollectionConverter.xml +++ b/xml/System.Web.UI.Design/DataBindingCollectionConverter.xml @@ -24,18 +24,11 @@ Provides a type converter for objects. - method for all destination types except , for which an empty string ("") is returned. - - - -## Examples - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_WebNet/DataSourceTypeConverterExamples/CPP/datasourcetypeconverterexamples.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/DataSourceTypeConverterExamples/CS/datasourcetypeconverterexamples.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/DataSourceTypeConverterExamples/VB/datasourcetypeconverterexamples.vb" id="Snippet1"::: - + method for all destination types except , for which an empty string ("") is returned. + ]]> @@ -96,11 +89,11 @@ Converts a data binding collection to the specified type. The object produced by the type conversion. If the parameter is of type , this method returns an empty string (""). - . Otherwise this method calls the method of the base class. - + . Otherwise this method calls the method of the base class. + ]]> diff --git a/xml/System.Web.UI.MobileControls.Adapters.XhtmlAdapters/XhtmlCssHandler.xml b/xml/System.Web.UI.MobileControls.Adapters.XhtmlAdapters/XhtmlCssHandler.xml index 1b3a261e566..b9348512766 100644 --- a/xml/System.Web.UI.MobileControls.Adapters.XhtmlAdapters/XhtmlCssHandler.xml +++ b/xml/System.Web.UI.MobileControls.Adapters.XhtmlAdapters/XhtmlCssHandler.xml @@ -30,24 +30,13 @@ Handles requests for cascading style sheet (CSS) style information for adapters in the namespace. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - class, you must add an property section to the Web.config file, as shown in the following code example: - -``` - - - -``` - + class, you must add an property section to the Web.config file. + ]]> - ASP.NET and XHTML Compliance @@ -122,10 +111,10 @@ type = The current . Processes all HTTP requests for CSS style information for the XHTML adapter set. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. To be added. - The does not contain "_css". - - -or- - + The does not contain "_css". + + -or- + The CSS style sheet named in the cannot be found. diff --git a/xml/System.Web.UI.MobileControls/AdRotator.xml b/xml/System.Web.UI.MobileControls/AdRotator.xml index bf9f2264557..3f0ab2a32c5 100644 --- a/xml/System.Web.UI.MobileControls/AdRotator.xml +++ b/xml/System.Web.UI.MobileControls/AdRotator.xml @@ -55,29 +55,6 @@ The property specifies the location of an XML file that contains advertisement information. This file must reside within the application domain. For security purposes, XML files should be in the App_Data folder, which is configured to not allow users direct access to XML files. If the property is empty, the control generates a single break tag as a placeholder. This is useful when you do not want to display an advertisement. - - -## Examples - The following code example consists of two parts: an ASP.NET mobile Web Forms page in an `.aspx` file and an XML file. The `.aspx` file uses a file named `ads.xml` to rotate through various advertisements based on the property. If you provide the images for the example, they will be displayed; otherwise, the control displays the value of the property for the advertisements. When the user refreshes the mobile Web Forms page, the page displays the next randomly selected advertisement, based on the . - - The example also shows how to use a [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element to override the properties if the user's browser requires WML markup, and how to map the image's `src` and `href` attributes to the data in the XML file using the and properties, respectively. - - Although the example uses a function to determine whether the browser requires WML (`isWML11`), you can instead use a Web.config file to define a element that the .NET Framework automatically uses to make the determination for you: - - - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - The `.aspx` file: - - [!code-aspx-csharp[MobileAdRotatorSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#1)] - [!code-aspx-vb[MobileAdRotatorSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#1)] - - The sample `ads.xml` file (which must be located in the **App_Data** folder): - - [!code-xml[MobileAdRotatorSample#2](~/snippets/common/VS_Snippets_WebNet/MobileAdRotatorSample/Common/ads.xml#2)] - ]]> @@ -149,18 +126,9 @@ ||Specifies the image to be rendered in the control.| ||Specifies the URL reference that the browser navigates to when the advertisement is clicked.| - - -## Examples - The following code sample handles the event, and is only part of a larger example for the class overview. - - [!code-csharp[MobileAdRotatorSample#3](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#3)] - [!code-vb[MobileAdRotatorSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#3)] - ]]> - Introduction to the AdRotator Control @@ -280,26 +248,10 @@ You can also use separate [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) elements to override this setting to show alternate images for the advertisement. - - -## Examples - The following code example demonstrates how to use the property to select a specific item from a record in the XML file. This .aspx file specifies that the value for the image URL can be obtained from the `` element of the XML file, and uses a [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element to select a different image URL if the user's browser requires WML markup. - - The `.aspx` file: - - [!code-aspx-csharp[MobileAdRotatorSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#1)] - [!code-aspx-vb[MobileAdRotatorSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#1)] - - The sample `ads.xml` file (which must be located in the **App_Data** folder): - - [!code-xml[MobileAdRotatorSample#2](~/snippets/common/VS_Snippets_WebNet/MobileAdRotatorSample/Common/ads.xml#2)] - ]]> - Introduction to the AdRotator Control - <Choice> Element @@ -340,19 +292,9 @@ If the property has data and this property has content but there is no keyword match between this property and the file, a blank image displays and a trace warning is generated. - - -## Examples - The following code example demonstrates how to use the property to set the preference from a collection of images in the file referred by the property. For the complete sample code, see the class overview. - - [!code-aspx-csharp[MobileAdRotatorSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#4)] - [!code-aspx-vb[MobileAdRotatorSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#4)] - ]]> - Introduction to the AdRotator Control - <Choice> Element @@ -391,19 +333,9 @@ ## Remarks You can use [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) elements to override this setting to show alternate URLs for the advertisement. - - -## Examples - The following code example demonstrates how to use the property to set the target URL for the advertisement. For the complete sample code, see the class overview. - - [!code-aspx-csharp[MobileAdRotatorSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#4)] - [!code-aspx-vb[MobileAdRotatorSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#4)] - ]]> - Introduction to the AdRotator Control - <Choice> Element diff --git a/xml/System.Web.UI.MobileControls/Calendar.xml b/xml/System.Web.UI.MobileControls/Calendar.xml index c42d27f0582..1562f27be3f 100644 --- a/xml/System.Web.UI.MobileControls/Calendar.xml +++ b/xml/System.Web.UI.MobileControls/Calendar.xml @@ -71,17 +71,6 @@ The mobile control wraps a Web Forms control. Although the mobile control mimics some properties, methods, and events of the underlying control, it does not expose other properties specific to HTML rendering. To modify these, you can access the underlying control through the property and modify the settings directly. - - -## Examples - The following code example shows how the property in the page load code block allows the user to select a day, a week, or a month block of time. This example sets the and properties of the class to distinguish the user selection. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileCalendarExample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#1)] - [!code-aspx-vb[MobileCalendarExample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#1)] - ]]> @@ -147,17 +136,8 @@ ## Remarks When this property is set to `null`, the default is the localized string (for example, "Calendar"). - - -## Examples - The following code example demonstrates how to use the property to set the text that is displayed to the user. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#2)] - [!code-vb[MobileCalendarExample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#2)] - ]]> - ASP.NET Mobile Web Pages @@ -375,18 +355,9 @@ This property has the same functionality as the ASP.NET property. - - -## Examples - The following code example demonstrates how to the use the property to refer to the selected day. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#4)] - [!code-vb[MobileCalendarExample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#4)] - ]]> - ASP.NET Mobile Web Pages @@ -425,17 +396,8 @@ ## Remarks This property represents a collection of selected dates in a control. - - -## Examples - The following code example demonstrates how to use the property to select all the Wednesdays in the current month. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#8](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#8)] - [!code-vb[MobileCalendarExample#8](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#8)] - ]]> - ASP.NET Mobile Web Pages @@ -549,17 +511,8 @@ ## Remarks This property has the same functionality as the Web Forms property. - - -## Examples - The following code example demonstrates how to use the property to show the headers for the days. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#5](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#5)] - [!code-vb[MobileCalendarExample#5](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#5)] - ]]> - ASP.NET Mobile Web Pages @@ -639,17 +592,8 @@ This property has the same functionality as the Web Forms property. - - -## Examples - The following code example demonstrates how to use the property to set the visible dates on the calendar. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#9](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#9)] - [!code-vb[MobileCalendarExample#9](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#9)] - ]]> - ASP.NET Mobile Web Pages @@ -692,17 +636,8 @@ ## Remarks The ASP.NET mobile controls do not duplicate the properties of the ASP.NET Web Forms control that are not supported on mobile devices. Thus, if you want to use features that are available for the underlying control, you do so by accessing the object through the property. - - -## Examples - The following code example uses the property to apply formatting that is only available in the underlying control. This example is part of a larger code sample for the overview. - - [!code-csharp[MobileCalendarExample#10](~/snippets/csharp/VS_Snippets_WebNet/MobileCalendarExample/cs/MobileCalendarExample.aspx#10)] - [!code-vb[MobileCalendarExample#10](~/snippets/visualbasic/VS_Snippets_WebNet/MobileCalendarExample/vb/MobileCalendarExample.aspx#10)] - ]]> - ASP.NET Mobile Web Pages diff --git a/xml/System.Web.UI.MobileControls/Command.xml b/xml/System.Web.UI.MobileControls/Command.xml index 4c0844e9310..01d30565ac1 100644 --- a/xml/System.Web.UI.MobileControls/Command.xml +++ b/xml/System.Web.UI.MobileControls/Command.xml @@ -83,17 +83,6 @@ > [!CAUTION] > Avoid using special characters in ASP.NET mobile Web page URLs. The HREF tags generated for posting `Command` events back to the server are not strictly validated. For example, a URL that includes spaces results in the generation of WML that cannot be handled by some WML browsers. - - -## Examples - The following code example demonstrates how to attach command events. Clicking either of the buttons raises the event. The user-defined function uses the `CommandEventArgs` argument to see which button was clicked. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileCommandExample/CS/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileCommandExample/VB/default.aspx" id="Snippet1"::: - ]]> @@ -188,17 +177,6 @@ ## Remarks When a control is activated, it raises the event. For more information, see the "Device-Specific Rendering" and "Device-Specific Behavior" sections in . - - -## Examples - The following code example demonstrates how to attach command events. Clicking either of the buttons raises the event. The user-defined function uses the `CommandEventArgs` argument to see which button was clicked. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileCommandExample/CS/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileCommandExample/VB/default.aspx" id="Snippet1"::: - ]]> Introduction to the Command Control @@ -234,20 +212,7 @@ Sets or returns the argument associated with the command in the event. The default value is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The argument associated with the command in the . - - property to display a value. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileItemCommandSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileItemCommandSample/vb/default.aspx" id="Snippet1"::: - - ]]> - + To be added. Introduction to the Command Control @@ -330,17 +295,6 @@ > [!NOTE] > The property supports the value only on devices that support JavaScript as indicated by the property. - - -## Examples - The following example demonstrates how to the use the property to render the command as a link or a button. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileItemCommandSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileItemCommandSample/vb/default.aspx" id="Snippet1"::: - ]]> Introduction to the Command Control @@ -456,14 +410,6 @@ The event is raised after an event. In a scenario where you repeat the same set of actions each time a command button is clicked, you can use either the or property of the control to identify which command button the user clicked. - - -## Examples - The following code example demonstrates how to use the event for multiple commands on a page. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileItemCommandSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileItemCommandSample/vb/default.aspx" id="Snippet1"::: - ]]> Introduction to the Command Control diff --git a/xml/System.Web.UI.MobileControls/CompareValidator.xml b/xml/System.Web.UI.MobileControls/CompareValidator.xml index 3eb4d322561..b2300d409c8 100644 --- a/xml/System.Web.UI.MobileControls/CompareValidator.xml +++ b/xml/System.Web.UI.MobileControls/CompareValidator.xml @@ -51,17 +51,6 @@ Validation succeeds if the input control is empty. Use a control to require the user to enter data into the input control. - - -## Examples - The following example code uses a control (`CompareValidator1`) to check whether the two text boxes have the same value and alerts the user if they are different. - -> [!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 language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileCompareValidatorSample/CS/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileCompareValidatorSample/VB/default.aspx" id="Snippet1"::: - ]]> Introduction to the CompareValidator Control diff --git a/xml/System.Web.UI.MobileControls/CustomValidator.xml b/xml/System.Web.UI.MobileControls/CustomValidator.xml index 3e478a61ac1..b38e4978f92 100644 --- a/xml/System.Web.UI.MobileControls/CustomValidator.xml +++ b/xml/System.Web.UI.MobileControls/CustomValidator.xml @@ -51,20 +51,6 @@ By default, controls on a form raise validator events on the form to perform validation when the form is submitted to the server. To disable automatic validation, set the property on the controls to `false`. - - -## Examples - The following example checks whether the value that a user places into the control is an even number. If the value is an even number, then the page is valid. If not, the page is not valid, and the displays the property. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - -> [!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 language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileCustomValidatorSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileCustomValidatorSample/vb/Default.aspx" id="Snippet1"::: - ]]> Introduction to the CustomValidator Control @@ -230,14 +216,6 @@ ## Remarks If a method is registered with this event, it is called with the value of the property. Validation succeeds only if this event handler returns `true`. - - -## Examples - The following example demonstrates how to trap the event to add logic to validate the page. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileCustomValidatorSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileCustomValidatorSample/vb/Default.aspx" id="Snippet1"::: - ]]> Introduction to the CustomValidator Control diff --git a/xml/System.Web.UI.MobileControls/DeviceSpecific.xml b/xml/System.Web.UI.MobileControls/DeviceSpecific.xml index e67bc73f6ef..021915717ea 100644 --- a/xml/System.Web.UI.MobileControls/DeviceSpecific.xml +++ b/xml/System.Web.UI.MobileControls/DeviceSpecific.xml @@ -64,31 +64,9 @@ > [!NOTE] > Even though the class inherits from the Web Forms `System.Web.UI.Control` namespace, this is only an implementation detail. A `` element does not behave like a control. - - -## Examples - The following code example demonstrates how to use and objects to create interfaces specific to a variety of devices in a mobile form. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileTemplateContainerSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileTemplateContainerSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileTemplateContainerSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileTemplateContainerSample/vb/Default.aspx#1)] - - All of the code above can be replaced declaratively with the following markup: - - - - For these examples, the Web.config file must have the following elements: - - - ]]> - <DeviceSpecific> Element - <Choice> Element - Introduction to the DeviceSpecific Control @@ -172,22 +150,8 @@ ## Remarks At run time, the choices in the collection are evaluated in the order that they are stored. For more information about choice and device-specific concepts, see the [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element. - - -## Examples - The following code example demonstrates the use of the property to display the number of templates contained in the first filter defined in the ASP.NET mobile Web application. For a more complete code sample, see the example for the overview. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-csharp[MobileDeviceSpecificSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileDeviceSpecificSample/cs/Default.aspx#1)] - [!code-vb[MobileDeviceSpecificSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileDeviceSpecificSample/vb/Default.aspx#1)] - ]]> - Introduction to the DeviceSpecific Control - <DeviceSpecific> Element - <Choice> Element @@ -563,19 +527,8 @@ ## Remarks You can use a DeviceSpecific/Choice construct to specify device-specific content, such as property overrides or templates, for a control or style. To select a choice from the choices in a [\](https://learn.microsoft.com/previous-versions/aspnet/26s26ahw(v=vs.100)) element, ASP.NET evaluates each choice in sequential order against the capabilities of the target device. The first matching choice is made the selected choice, and is used for device-specific content. - - -## Examples - The following code example demonstrates how to use the property to display the filter associated with the current choice. For a more complete code sample, see the example for the overview. - - [!code-csharp[MobileDeviceChoiceSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileDeviceChoiceSample/cs/Default.aspx#1)] - [!code-vb[MobileDeviceChoiceSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileDeviceChoiceSample/vb/Default.aspx#1)] - ]]> - <DeviceSpecific> Element - <Choice> Element - Introduction to the DeviceSpecific Control diff --git a/xml/System.Web.UI.MobileControls/DeviceSpecificChoice.xml b/xml/System.Web.UI.MobileControls/DeviceSpecificChoice.xml index 4d6a9be2d8a..f08a0d54d16 100644 --- a/xml/System.Web.UI.MobileControls/DeviceSpecificChoice.xml +++ b/xml/System.Web.UI.MobileControls/DeviceSpecificChoice.xml @@ -46,22 +46,7 @@ ](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element. Choices are tested in the order that they appear within a [\](https://learn.microsoft.com/previous-versions/aspnet/26s26ahw(v=vs.100)) element. If you specify the property of the `` element, its value must be the name of a device filter defined in the `` section of the Machine.config file. At run time, ASP.NET evaluates the specified device filter against the capabilities of the current device. If successful, the choice is selected. If you do not specify the property, the defaults for the `` element are selected. - - - -## Examples - The following code example shows a `` element within an image. The `Source` attribute overrides the property of the control. - - Although the example uses functions to determine whether the browser requires WML (`isWML11`) or supports color (`supportsColor`), you can instead use a Web.config file to define a `` element that the .NET Framework automatically uses to make the determination for you. - - - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileDeviceSpecificChoiceSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileDeviceSpecificChoiceSample/vb/Default.aspx" id="Snippet1"::: + This class is analogous to the [\](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element. Choices are tested in the order that they appear within a [\](https://learn.microsoft.com/previous-versions/aspnet/26s26ahw(v=vs.100)) element. If you specify the property of the `` element, its value must be the name of a device filter defined in the `` section of the Machine.config file. At run time, ASP.NET evaluates the specified device filter against the capabilities of the current device. If successful, the choice is selected. If you do not specify the property, the defaults for the `` element are selected.bNet/MobileDeviceSpecificChoiceSample/vb/Default.aspx" id="Snippet1"::: ]]> diff --git a/xml/System.Web.UI.MobileControls/DeviceSpecificChoiceCollection.xml b/xml/System.Web.UI.MobileControls/DeviceSpecificChoiceCollection.xml index aea54988356..f72a01230e3 100644 --- a/xml/System.Web.UI.MobileControls/DeviceSpecificChoiceCollection.xml +++ b/xml/System.Web.UI.MobileControls/DeviceSpecificChoiceCollection.xml @@ -29,24 +29,9 @@ ## Remarks Accessing the property of a object retrieves a object. This collection implements the interface (through the object); it implements all properties and methods of the interface. - - -## Examples - The following code example shows how to use the class to gain access to the choices in a DeviceSpecific/Choice construct. For your convenience, a Web.config file containing the filters follows the example code. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileDeviceSpecificChoiceCollectionSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileDeviceSpecificChoiceCollectionSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileDeviceSpecificChoiceCollectionSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileDeviceSpecificChoiceCollectionSample/vb/Default.aspx#1)] - - ]]> - Introduction to the DeviceSpecific Control - <DeviceSpecific> Element - <Choice> Element @@ -72,23 +57,10 @@ The object to add to the end of the collection. Adds a object to the end of a collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - - object programmatically (with a filter named `isCHTML10`) to the form. This example is part of a larger example for the overview. - - [!code-csharp[MobileDeviceSpecificChoiceCollectionSample#3](~/snippets/csharp/VS_Snippets_WebNet/MobileDeviceSpecificChoiceCollectionSample/cs/Default.aspx#3)] - [!code-vb[MobileDeviceSpecificChoiceCollectionSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MobileDeviceSpecificChoiceCollectionSample/vb/Default.aspx#3)] - - ]]> - + To be added. - Introduction to the DeviceSpecific Control - <DeviceSpecific> Element - <Choice> Element diff --git a/xml/System.Web.UI.MobileControls/Form.xml b/xml/System.Web.UI.MobileControls/Form.xml index 513cca80cf1..e40a4d1d46b 100644 --- a/xml/System.Web.UI.MobileControls/Form.xml +++ b/xml/System.Web.UI.MobileControls/Form.xml @@ -72,22 +72,10 @@ ## Remarks A form represents the outermost grouping of controls within an ASP.NET mobile Web page. An individual mobile Web page can contain multiple forms at the outermost level. Forms cannot be nested; use controls if you want to nest containers. For more information, see [Introduction to the Form Control](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/dxzx3ss0(v=vs.85)). To display a specific form, either set the property on the current page to the desired form, or set the property in a control to the desired form. You can include literal text along with its accompanying markup tags in the text contents of the control. When using templates, it is important to remember that the control creates instances of templates in the method for the form. The method for the form is called before `Page_Load` and `Page_Init`. Also, the page constructor executes too early to set templates in the method because the form is not yet created. To correct this, hook the form's own method, and create an instance of the template there. For more information, see [Implementing Templated Rendering](https://learn.microsoft.com/previous-versions/aspnet/ah665120(v=vs.100)). - - -## Examples - The following code example shows how to create a page with two forms along with links between the two forms. One form has a check box list. When items are selected and the **Submit** button is clicked, the form presents a list of the selected items and their values. Notice that the event methods prepare the respective forms for display - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - [!code-aspx-csharp[MobileFormSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileFormSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default.aspx#1)] - ]]> - Introduction to the Form Control @@ -192,22 +180,9 @@ This event's position in the event chain makes it very important for binding child controls to data sources or for setting a form property that can be inherited by all child controls. - - -## Examples - The following code example shows how to set the `OnActivate` attribute in the element to point to a method that executes when the event occurs. The `Form2_Activate` method prepares the second form for display. This example is part of a larger example for the overview. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - [!code-csharp[MobileFormSample#3](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default.aspx#3)] - [!code-vb[MobileFormSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default.aspx#3)] -[!code-aspx-vb[MobileFormSample#8](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#8)] - ]]> - Introduction to the Form Control @@ -306,23 +281,9 @@ ## Remarks The property is used to allow a single control on a form to paginate its contents across several views on mobile devices and providing next and previous navigation between views. A control can paginate its contents even if a containing control has its property set to `false`. - - -## Examples - The following code example demonstrates how to use the property of the class to specify which control to paginate. - - The example creates a page with two forms. One form has a very long string that on some devices must be paginated to give the user access to the entire text. In order to see the pagination in action, you must view the example on a device that handles pagination. In Visual Studio 2005, you can use one of the device emulators available with the **Device Emulator Manager** on the **Tools** menu. - -> [!NOTE] -> The following code example uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code example must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - [!code-aspx-csharp[MobileFormSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default2.aspx#4)] - [!code-aspx-vb[MobileFormSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#4)] - ]]> - Introduction to the Form Control @@ -427,17 +388,8 @@ If neither of these actions occurs, the active form will never receive a event. This event's position in the event chain makes it very important in resetting the child controls, data set, or global variables. - - -## Examples - The following code example demonstrates how to trap the event to clear the . This example is part of a larger example for the overview. - - [!code-csharp[MobileFormSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default.aspx#2)] - [!code-vb[MobileFormSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default.aspx#2)] - ]]> - Introduction to the Form Control @@ -474,27 +426,8 @@ Returns a panel that represents the footer for the form. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The that represents the footer for the form. - - property to access the contents of the `FooterTemplate`. - - This example is from a larger example for the property. - - [!code-csharp[MobileFormSample#5](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default2.aspx#5)] - [!code-vb[MobileFormSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#5)] - - In this example, since no filter is specified for the `` element, it will always be the . To specify a filter change the element to: `` and include a Web.config file that defines the filters you want to use. - - [!code-aspx-vb[MobileFormSample#8](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#8)] - - ]]> - + To be added. - Introduction to the Form Control - DeviceSpecific Element - <Choice> Element @@ -950,19 +883,10 @@ > [!NOTE] > This value is available after the event has occurred. To get the property, you can handle the event of the form. - - -## Examples - The following code example demonstrates how to use the property of the control. This code example is part of a larger example for the property. - - [!code-csharp[MobileFormSample#5](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default2.aspx#5)] - [!code-vb[MobileFormSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#5)] - ]]> - Introduction to the Form Control @@ -1005,17 +929,8 @@ ## Remarks If this property is set programmatically, it is not persisted for each request. If the property is set declaratively, the property is persisted for each request. - - -## Examples - The following code example demonstrates how to use the property. This code example is from a larger example for the property. - - [!code-csharp[MobileFormSample#6](~/snippets/csharp/VS_Snippets_WebNet/MobileFormSample/cs/Default2.aspx#6)] - [!code-vb[MobileFormSample#6](~/snippets/visualbasic/VS_Snippets_WebNet/MobileFormSample/vb/Default2.aspx#6)] - ]]> - Introduction to the Form Control diff --git a/xml/System.Web.UI.MobileControls/Image.xml b/xml/System.Web.UI.MobileControls/Image.xml index 1c78e8b1345..663ada9f6be 100644 --- a/xml/System.Web.UI.MobileControls/Image.xml +++ b/xml/System.Web.UI.MobileControls/Image.xml @@ -56,20 +56,6 @@ > [!NOTE] > If your application relies on cookieless sessions, or might receive requests from browsers that require cookieless sessions, using a tilde ("\~") in a path can inadvertently result in creating a new session and potentially losing session data. To set a property with a path such as ("\~/path"), resolve the path using ("\~/path") before assigning it to the property. - - -## Examples - The following code sample code shows how to use a [\](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/k20acyeh(v=vs.85)) control within an Image control to specify different images for different devices. If you have available a file named Sunshine.gif, it will appear in Internet Explorer. If you view the page on a WML device such as an OpenWave phone or a CHTML device, it will appear as a sun icon. The page also displays the name of the browser and the resolved name of the image. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileImageSample/cs/Default.aspx" id="Snippet1"::: - - The following is the `` section of the `Web.config` file. - - - ]]> Introduction to the Image Control @@ -180,21 +166,7 @@ For example, you can specify `symbol:63726` as the property value for all devices that require WML markup, and Sunshine.gif as the property value for HTML devices. The exact resolution of the value is provided by an image adapter (such as , , or ). - - - -## Examples - The following code example shows how to use a `` control within an control to specify different images for different devices. If a file named Sunshine.gif is available, it will appear in Internet Explorer. If you view the page on a WML device such as an OpenWave phone or a CHTML device, it will appear as a sun icon. The page also displays the name of the browser and the resolved name of the image. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileImageSample/cs/Default.aspx" id="Snippet1"::: - - The following is the `` section of the Web.config file. - - - + ]]> Introduction to the Image Control diff --git a/xml/System.Web.UI.MobileControls/List.xml b/xml/System.Web.UI.MobileControls/List.xml index 5849c31d287..065fb168ffd 100644 --- a/xml/System.Web.UI.MobileControls/List.xml +++ b/xml/System.Web.UI.MobileControls/List.xml @@ -74,24 +74,14 @@ Renders a list of items as either a static display or an interactive list. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - . Notice that you can programmatically set the and properties of the object. - - [!code-aspx-csharp[MobileListSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileListSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#1)] - + - Introduction to the Link Control - Pagination @@ -215,11 +205,11 @@ The source from which items in the collection are created. Creates items in an items collection from the specified parameter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - Introduction to the List Control @@ -260,11 +250,11 @@ Gets or sets the name of the data member to extract when data binding to a list data source. The default value is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The name of the data member to extract when data binding to a list data source. - property is of type , rather than of type . - + property is of type , rather than of type . + ]]> Introduction to the List Control @@ -305,11 +295,11 @@ Gets or sets the data source of the list that is being bound. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The data source of the list that is being bound. - method to ensure data binding. The data source can either be of type , or it can be of type . If the data source is of type , you can use the field to specify which member to extract. - + method to ensure data binding. The data source can either be of type , or it can be of type . If the data source is of type , you can use the field to specify which member to extract. + ]]> Introduction to the List Control @@ -414,28 +404,19 @@ Gets or sets the type of decoration used for items. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. An enumerated value representing the type of decoration used for items. - enumeration has the following values: - -|Name|Description| -|----------|-----------------| -||No decoration.| -||List items are decorated with a bullet.| -||List items are decorated with a number.| - - - -## Examples - The following code example demonstrates how to use the property to change the list to a numbered list. The property is set in the last line of the `Page_Load` method. This example is part of a larger example for the overview. - - [!code-csharp[MobileListSample#3](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#3)] - [!code-vb[MobileListSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#3)] - + enumeration has the following values: + +|Name|Description| +|----------|-----------------| +||No decoration.| +||List items are decorated with a bullet.| +||List items are decorated with a number.| + ]]> - Introduction to the List Control @@ -568,22 +549,13 @@ Occurs when the user selects a command that is associated with a control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - event handler is called through the event-bubbling mechanism of ASP.NET. The event handler is passed an argument of type , which contains information about the source item and the property of the control that generated the event. This allows you to render a single list item with multiple associated interactions. - - On default rendering, the control provides a basic user interface (UI) that allows the user to click list items. On postback, the event handler is called with an argument of type , which contains information about the source item. The property of this object is `null`. - - - -## Examples - The following code example shows how to use the event to call a method that changes the status of an item in the list and recalculates the status totals. This example is part of a larger example for the overview. - - -[!code-csharp[MobileListSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#2)] -[!code-vb[MobileListSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#2)] - + event handler is called through the event-bubbling mechanism of ASP.NET. The event handler is passed an argument of type , which contains information about the source item and the property of the control that generated the event. This allows you to render a single list item with multiple associated interactions. + + On default rendering, the control provides a basic user interface (UI) that allows the user to click list items. On postback, the event handler is called with an argument of type , which contains information about the source item. The property of this object is `null`. + ]]> @@ -591,7 +563,6 @@ - Introduction to the List Control @@ -614,19 +585,11 @@ Occurs when an item in a is bound to data. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - is created and data-bound, this event handler sets the properties of the list item from arbitrary expressions. An item in a is of type . This event is raised as each data source item is bound. This is the best time to filter or group items in the collection, by using the or Property. - - - -## Examples - The following code example demonstrates how to use the event to get the starting totals of status settings for the list. This code is part of a larger example for the overview. - - [!code-csharp[MobileListSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#4)] - [!code-vb[MobileListSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#4)] - + is created and data-bound, this event handler sets the properties of the list item from arbitrary expressions. An item in a is of type . This event is raised as each data source item is bound. This is the best time to filter or group items in the collection, by using the or Property. + ]]> @@ -634,7 +597,6 @@ - Introduction to the List Control @@ -680,11 +642,11 @@ Returns the collection of items in a list. The default value is an empty collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The collection of items in the list. - collection by using the , , and methods of the class. - + collection by using the , , and methods of the class. + ]]> Introduction to the List Control @@ -722,11 +684,11 @@ if items in the list are to be treated as hyperlinks; otherwise, . - property is used to display the text of the hyperlink, and the property is used to specify the target URL. Command events will not be generated for these links. Thus, when the property is set to `true`, an method will not be called because a new page will be loaded through an HTTP call. - + property is used to display the text of the hyperlink, and the property is used to specify the target URL. Command events will not be generated for these links. Thus, when the property is set to `true`, an method will not be called because a new page will be loaded through an HTTP call. + ]]> Introduction to the List Control @@ -841,11 +803,11 @@ An object (defined by ) that contains event data. Called when a list item generates an event as a result of user interaction. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - event. Inheriting classes can override this method to perform other tasks. - + event. Inheriting classes can override this method to perform other tasks. + ]]> @@ -876,11 +838,11 @@ An object (defined by ) that contains event data. Called when a list item is data bound. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - event. Inheriting classes can override this method to perform other tasks. - + event. Inheriting classes can override this method to perform other tasks. + ]]> @@ -1048,11 +1010,11 @@ An optional event argument to be passed to the event handler. For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> Introduction to the List Control diff --git a/xml/System.Web.UI.MobileControls/ListCommandEventArgs.xml b/xml/System.Web.UI.MobileControls/ListCommandEventArgs.xml index 6a35ea3942e..25e04ce4310 100644 --- a/xml/System.Web.UI.MobileControls/ListCommandEventArgs.xml +++ b/xml/System.Web.UI.MobileControls/ListCommandEventArgs.xml @@ -23,23 +23,8 @@ Provides data for the event of a control. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - - object to modify the status of tasks in a list when the item is clicked. This example is part of a larger example for the overview. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-csharp[MobileListSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#2)] - [!code-vb[MobileListSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#2)] - - ]]> - + To be added. - Using ASP.NET Mobile Controls - ASP.NET Mobile Web Pages @@ -181,21 +166,9 @@ Even if a default command is defined, you should include a command with the same name in the commands collection. If the control cannot render a graphical element that includes a shortcut for the default command, the default command is still available by rendering the collection. - - -## Examples - The following code example demonstrates how to the use the property to specify "Check" as the default command. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileCmdEventArgsSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileCmdEventArgsSample/cs/Default.aspx#1)] - ]]> - Using ASP.NET Mobile Controls - ASP.NET Mobile Web Pages diff --git a/xml/System.Web.UI.MobileControls/ListDataBindEventArgs.xml b/xml/System.Web.UI.MobileControls/ListDataBindEventArgs.xml index 04ebf3b299f..f52c5655fc9 100644 --- a/xml/System.Web.UI.MobileControls/ListDataBindEventArgs.xml +++ b/xml/System.Web.UI.MobileControls/ListDataBindEventArgs.xml @@ -23,19 +23,8 @@ Provides parameters for an event. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - - event to get the starting totals of status settings for the list. This code is part of a larger example for the overview. - - [!code-csharp[MobileListSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#4)] - [!code-vb[MobileListSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#4)] - - ]]> - + To be added. - Introduction to the List Control @@ -61,11 +50,11 @@ Initializes . Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object. The constructor initializes the and properties with the values of `listItem` and `dataItem`, respectively. - + object. The constructor initializes the and properties with the values of `listItem` and `dataItem`, respectively. + ]]> diff --git a/xml/System.Web.UI.MobileControls/LoadItemsEventArgs.xml b/xml/System.Web.UI.MobileControls/LoadItemsEventArgs.xml index 65d33b60ad6..d99ca6179a3 100644 --- a/xml/System.Web.UI.MobileControls/LoadItemsEventArgs.xml +++ b/xml/System.Web.UI.MobileControls/LoadItemsEventArgs.xml @@ -29,17 +29,6 @@ ## Remarks The class object provides event data with information about how many items to load into the control on demand. - - -## Examples - The following code example demonstrates how the event calls the function `LoadNow`. The property determines the number of items to be added to an array that is bound to a list. In order to see the effects of this example, you must view the page on a device that can paginate the list. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileLoadListEventArgsSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileLoadListEventArgsSample/vb/default.aspx" id="Snippet1"::: - ]]> Pagination Support diff --git a/xml/System.Web.UI.MobileControls/MobileControl.xml b/xml/System.Web.UI.MobileControls/MobileControl.xml index 3c2d8dc3990..97f5b6684d5 100644 --- a/xml/System.Web.UI.MobileControls/MobileControl.xml +++ b/xml/System.Web.UI.MobileControls/MobileControl.xml @@ -694,19 +694,6 @@ ## Remarks This method is overridden by the and classes. -```csharp -public override void EnsureTemplatedUI() -``` - - - -## Examples - The following example demonstrates how to use the method to access the contents of the `Label1` control within details view of the . This complete example also demonstrates several other features of the class. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the ASP.NET Web page code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - ]]> diff --git a/xml/System.Web.UI.MobileControls/MobileListItem.xml b/xml/System.Web.UI.MobileControls/MobileListItem.xml index e9454a3b976..5afc2d4b063 100644 --- a/xml/System.Web.UI.MobileControls/MobileListItem.xml +++ b/xml/System.Web.UI.MobileControls/MobileListItem.xml @@ -36,19 +36,11 @@ Represents an individual item within a or ASP.NET mobile control. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - , the element name is `Item`. On a mobile page, you declare an item by using the [\](https://msdn.microsoft.com/library/7152e195-e1d6-4a91-9dba-e0536a676e79) element. - - - -## Examples - The following code example shows how you manipulate items in the object through the class by using the selected item's index of the property. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileListItemSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileListItemSample/vb/Default.aspx" id="Snippet1"::: - + , the element name is `Item`. On a mobile page, you declare an item by using the [\](https://msdn.microsoft.com/library/7152e195-e1d6-4a91-9dba-e0536a676e79) element. + ]]> @@ -85,11 +77,11 @@ Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the missing elements set to `null`. The parameterless constructor initializes all properties to `null`. - + object with the missing elements set to `null`. The parameterless constructor initializes all properties to `null`. + ]]> @@ -118,11 +110,11 @@ Initializes . Initializes a new instance of the class using the specified property. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the missing elements set to `null`. The object is initialized with the property set to the value of the `text` parameter. - + object with the missing elements set to `null`. The object is initialized with the property set to the value of the `text` parameter. + ]]> @@ -151,11 +143,11 @@ Initializes the specified item with this item type. Initializes a new instance of the class with the specified . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the missing elements set to `null`. The object is initialized with the `itemType` parameter. - + object with the missing elements set to `null`. The object is initialized with the `itemType` parameter. + ]]> @@ -186,11 +178,11 @@ Initializes . Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the missing elements set to `null`. The object is initialized with the and properties set to the values of the corresponding `text` and `value` parameters. - + object with the missing elements set to `null`. The object is initialized with the and properties set to the values of the corresponding `text` and `value` parameters. + ]]> @@ -223,11 +215,11 @@ Initializes . Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the missing elements set to `null`. The object is initialized with the , , and properties set to the values of the corresponding `dataItem`, `text`, and `value` parameters. - + object with the missing elements set to `null`. The object is initialized with the , , and properties set to the values of the corresponding `dataItem`, `text`, and `value` parameters. + ]]> @@ -491,19 +483,11 @@ Provides implicit conversion from a to a . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. A with set to the specified . - object created by implicit conversion uses the string input as the value of its property. - - - -## Examples - The following code example creates multiple objects using implicit conversion from strings, and adds them to a control. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileControls.MobileListItem.ImplicitSample/CS/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileControls.MobileListItem.ImplicitSample/VB/Default.aspx" id="Snippet1"::: - + object created by implicit conversion uses the string input as the value of its property. + ]]> @@ -594,11 +578,11 @@ if the object is tracking its view-state changes; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -631,11 +615,11 @@ An that contains the and the optional . For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -668,11 +652,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The view-state changes for the control. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -704,11 +688,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -743,13 +727,13 @@ Gets or sets the text contained in the item. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The text in the item. The default is an empty string (""). - property is an empty string or is never set, either programmatically or through the constructor, it returns the value of the property for the specified list item. - - The property can be specified by using the `Text` attribute, or as inner text. If the property is specified in both ways, the inner text always takes precedence. However, if the property is programmatically set, the inner text is automatically removed and the newly set property takes precedence. - + property is an empty string or is never set, either programmatically or through the constructor, it returns the value of the property for the specified list item. + + The property can be specified by using the `Text` attribute, or as inner text. If the property is specified in both ways, the inner text always takes precedence. However, if the property is programmatically set, the inner text is automatically removed and the newly set property takes precedence. + ]]> @@ -833,11 +817,11 @@ Gets or sets the value contained in the list item. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The value contained in the list item. The default is . - property. - + property. + ]]> diff --git a/xml/System.Web.UI.MobileControls/MobileListItemCollection.xml b/xml/System.Web.UI.MobileControls/MobileListItemCollection.xml index a58c4a1e86e..bfa092422db 100644 --- a/xml/System.Web.UI.MobileControls/MobileListItemCollection.xml +++ b/xml/System.Web.UI.MobileControls/MobileListItemCollection.xml @@ -28,21 +28,13 @@ Represents a collection of objects, and is used to hold the items of a control and a control. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - property of a control or the property of a control retrieves a object. You can add or remove items from the collection at run time. - - A object inherits from the interface. - - - -## Examples - The following code example shows how you manipulate items in the object through the class. The code uses the selected item's index into the property. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileListItemSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileListItemSample/vb/Default.aspx" id="Snippet1"::: - + property of a control or the property of a control retrieves a object. You can add or remove items from the collection at run time. + + A object inherits from the interface. + ]]> @@ -103,11 +95,11 @@ An array that contains a list of objects. Initializes a new instance of the class using the provided array. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - objects contained in the `items` parameter. - + objects contained in the `items` parameter. + ]]> Introduction to the List Control @@ -149,11 +141,11 @@ The item to add to the end of the collection. Adds an item to the end of a collection with the provided string as the property. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - Introduction to the List Control @@ -184,19 +176,11 @@ The item to add to the end of the collection. Adds an item to the end of a collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - method either adds the specified item to the end of the collection, or constructs a new list item with the specified text and then adds it to the end of the collection. - - - -## Examples - The following code example demonstrates how to use the method to add an item named `_ml` to the end of the . - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileListItemSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileListItemSample/vb/Default.aspx" id="Snippet1"::: - + method either adds the specified item to the end of the collection, or constructs a new list item with the specified text and then adds it to the end of the collection. + ]]> @@ -227,15 +211,15 @@ Clears the collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - interface. - - You can use the method for all the classes where this method applies. For example, the method for a collection clears all the styles in the collection; or for the , it clears all the choices in the collection. - - Adding a field to the fields of an object list changes the data-binding behavior of the control, and requires you to bind data to the control again. - + interface. + + You can use the method for all the classes where this method applies. For example, the method for a collection clears all the styles in the collection; or for the , it clears all the choices in the collection. + + Adding a field to the fields of an object list changes the data-binding behavior of the control, and requires you to bind data to the control again. + ]]> Introduction to the DeviceSpecific Control @@ -322,11 +306,11 @@ Gets the index of the specified item in a object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The index of the specified item in the collection. - method returns `-1`. - + method returns `-1`. + ]]> @@ -375,11 +359,11 @@ The item to be inserted into the list. Adds an item to the specified location in the collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object with the given string, and inserts this item. - + object with the given string, and inserts this item. + ]]> @@ -413,11 +397,11 @@ The item to be inserted into the list. Adds an item to the specified location in the collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - Introduction to the List Control @@ -681,11 +665,11 @@ if the object is tracking its view-state changes; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -718,11 +702,11 @@ The object containing the view state information to be loaded. For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> the view state data has been modified or corrupted. @@ -756,11 +740,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The view-state changes for the control. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -792,11 +776,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -824,11 +808,11 @@ Instructs the collection to track changes to its view state. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - property will return `true`. Also, the property of the objects in the will be set to `true`. - + property will return `true`. Also, the property of the objects in the will be set to `true`. + ]]> diff --git a/xml/System.Web.UI.MobileControls/MobilePage.xml b/xml/System.Web.UI.MobileControls/MobilePage.xml index e9f56c9eeeb..8c23157b4b1 100644 --- a/xml/System.Web.UI.MobileControls/MobilePage.xml +++ b/xml/System.Web.UI.MobileControls/MobilePage.xml @@ -160,17 +160,6 @@ ## Remarks When a page is initially rendered, the first form in the page is automatically made active. On subsequent postbacks, another form might be made active, either by programmatically setting this property, or as a result of user navigation through a control. - - -## Examples - The following example demonstrates how to use the property of a control. If the current mobile device allows for access keys for controls, the button will display the access key that submits the form. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileMobilePageSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileMobilePageSample/vb/Default.aspx" id="Snippet1"::: - ]]> The page does not contain any forms. @@ -337,17 +326,6 @@ > [!NOTE] > When custom attributes are enabled, typographic errors in property names can be interpreted as custom attributes. For example, if a developer incorrectly specifies the property of a control as "Txet", the parser would save it as a custom attribute called "Txet" instead of raising an exception. For this reason, custom attributes are disabled by default. - - -## Examples - The following example demonstrates how to use the property to enable the custom `AccessKey` attribute on the . - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if you copy it directly into a code-behind file. You must copy this code sample into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileMobilePageSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileMobilePageSample/vb/Default.aspx" id="Snippet1"::: - ]]> diff --git a/xml/System.Web.UI.MobileControls/ObjectList.xml b/xml/System.Web.UI.MobileControls/ObjectList.xml index ce781a2502d..616271d2dc5 100644 --- a/xml/System.Web.UI.MobileControls/ObjectList.xml +++ b/xml/System.Web.UI.MobileControls/ObjectList.xml @@ -79,26 +79,8 @@ ## Remarks Much of the behavior of the , including support for templated rendering through device template sets and internal pagination, is similar to the behavior of the . For more information, see the [Introduction to the ObjectList Control](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/d7hb3s0f(v=vs.85)) or the [Pagination](https://learn.microsoft.com/previous-versions/aspnet/8ss4ds3k(v=vs.100)) documentation. - - -## Examples - The following code example demonstrates how to create an array of a user-defined class and then bind it to an object when the page loads. It also shows how the list and details views display the commands. For this example, there is also a button that displays a form with a list of all the fields using the property. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileObjectListSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileObjectListSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default.aspx#1)] - - This is a sample Web.config file with several device specific filters. - - - ]]> - Creating Custom Mobile Controls - Introduction to the ObjectList Control - Pagination @@ -188,18 +170,8 @@ ## Remarks This collection is available only after data binding. Unlike the collection, you cannot add or remove items in this collection. By default, this collection is the set of automatically generated fields. If any fields are explicitly defined, they are contained after any automatically generated fields. - - -## Examples - The following code example demonstrates how to use the property to list all the fields of the . This example is part of a larger example for the overview. - - [!code-csharp[MobileObjectListSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default.aspx#2)] - [!code-vb[MobileObjectListSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default.aspx#2)] - ]]> - Creating Custom Mobile Controls - Introduction to the ObjectList Control @@ -243,21 +215,8 @@ ## Remarks When `true`, the object list handles the fields order in the collection. When `false`, you must specify the order of the fields and set the property to bind to a data source. - - -## Examples - The following code example demonstrates how to use the property to statically associate the fields with their collection in the Details view of an control. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileObjectListSample#5](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default2.aspx#5)] - [!code-aspx-vb[MobileObjectListSample#5](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default2.aspx#5)] - ]]> - Creating Custom Mobile Controls - Introduction to the ObjectList Control @@ -390,26 +349,9 @@ Since different devices have different requirements for styles. You may want several settings for the property. - - -## Examples - The following code example demonstrates how to the use the property to set the style of an using a declarative section to specify different settings for different devices. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileObjectListSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileObjectListSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default.aspx#1)] - - This is a sample Web.config file with several device specific filters. - - - ]]> - Creating Custom Mobile Controls - Introduction to the ObjectList Control @@ -1065,17 +1007,6 @@ On default rendering, the control renders each of the commands defined for the object list as a link. When the user clicks a link, the event handler is called with an argument of type , which contains information about the source item. The value in the property is the name of the command that the user invoked. - - -## Examples - The following code example demonstrates how to trap the event. The property specifies what action to perform. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileObjectListSample#10](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default3.aspx#10)] - [!code-aspx-vb[MobileObjectListSample#10](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default3.aspx#10)] - ]]> @@ -1083,8 +1014,6 @@ - Introduction to the ObjectList Control - Creating Custom Mobile Controls @@ -1112,14 +1041,6 @@ ## Remarks When an item in an is created and data-bound, this event handler sets the properties of the list item from arbitrary expressions. An item in an control is of type . - - -## Examples - The following code example demonstrates how to use event. You can use either the or property of the collection to determine further action. This example is part of a larger example for the overview. - - [!code-csharp[MobileObjectListSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default.aspx#4)] - [!code-vb[MobileObjectListSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default.aspx#4)] - ]]> @@ -1127,8 +1048,6 @@ - Introduction to the ObjectList Control - Creating Custom Mobile Controls @@ -2050,22 +1969,9 @@ This event is called after the event is called. You can use this event to perform other tasks before showing the detail view. You can add, remove, or rearrange fields, depending on the item selected in the list view. - - -## Examples - The following code example demonstrates how to use the event to remove an item from the of the detail view of an . The item to remove is selected in the list view. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileObjectListSample#10](~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default3.aspx#10)] - [!code-aspx-vb[MobileObjectListSample#10](~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default3.aspx#10)] - ]]> - Creating Custom Mobile Controls - Introduction to the ObjectList Control diff --git a/xml/System.Web.UI.MobileControls/ObjectListCommand.xml b/xml/System.Web.UI.MobileControls/ObjectListCommand.xml index 16dd4bb1233..1f75c67f98e 100644 --- a/xml/System.Web.UI.MobileControls/ObjectListCommand.xml +++ b/xml/System.Web.UI.MobileControls/ObjectListCommand.xml @@ -28,21 +28,13 @@ Represents a command in an ASP.NET mobile control. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - object can be declared as a `` element within the declaration of an . - - An object can be also constructed, and added programmatically to an , by adding it to the control's member collection. - - - -## Examples - The following example shows how to create an object. This example is part of a larger, more complete example for the overview. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileObjectListSample/cs/Default3.aspx" id="Snippet10"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileObjectListSample/vb/Default3.aspx" id="Snippet10"::: - + object can be declared as a `` element within the declaration of an . + + An object can be also constructed, and added programmatically to an , by adding it to the control's member collection. + ]]> Introduction to the ObjectList Control @@ -75,11 +67,11 @@ Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - Introduction to the ObjectList Control @@ -108,11 +100,11 @@ Initializes the property. Initializes a new instance of the class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - and properties, respectively. - + and properties, respectively. + ]]> Introduction to the ObjectList Control @@ -145,11 +137,11 @@ Gets the name of the command. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The name of the command. - Introduction to the ObjectList Control @@ -182,11 +174,11 @@ Gets or sets the text that is to appear in the command. The default is an empty string. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The text that is to appear in the command. - property can be specified by using the `Text` attribute, or as inner text. If the property is specified in both ways, the inner text always takes precedence. However, if the property is programmatically set, the inner text is automatically removed and the newly set property takes precedence. - + property can be specified by using the `Text` attribute, or as inner text. If the property is specified in both ways, the inner text always takes precedence. However, if the property is programmatically set, the inner text is automatically removed and the newly set property takes precedence. + ]]> Introduction to the ObjectList Control diff --git a/xml/System.Web.UI.MobileControls/PagedControl.xml b/xml/System.Web.UI.MobileControls/PagedControl.xml index 002d8ba0d10..5119a360fb5 100644 --- a/xml/System.Web.UI.MobileControls/PagedControl.xml +++ b/xml/System.Web.UI.MobileControls/PagedControl.xml @@ -24,15 +24,15 @@ Functions as a base class used by controls that support internal pagination. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - class exposes certain properties, methods, and events common to all controls that are capable of internal pagination. - - All controls that inherit from the class also support custom pagination, known as chunking. - - Similar to the class, this class is used for controls that have long text length, such as a , , or . - + class exposes certain properties, methods, and events common to all controls that are capable of internal pagination. + + All controls that inherit from the class also support custom pagination, known as chunking. + + Similar to the class, this class is used for controls that have long text length, such as a , , or . + ]]> Pagination Support @@ -93,11 +93,11 @@ Gets the first item visible on the current form page. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The first item visible on the current form page. - Pagination Support @@ -125,13 +125,13 @@ Gets the number of items in the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The number of items in the control. - must override this inherited property. - - The difference between the property and the property of the and classes is that if the property is called before the control view state is loaded, it returns the number of items in the view state, unlike the behavior of the property, which returns zero. - + must override this inherited property. + + The difference between the property and the property of the and classes is that if the property is called before the control view state is loaded, it returns the number of items in the view state, unlike the behavior of the property, which returns zero. + ]]> @@ -171,13 +171,13 @@ Gets or sets the count of items in the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The count of items in the control. - control might use list items as units, whereas a control might use characters. - + control might use list items as units, whereas a control might use characters. + ]]> @@ -217,21 +217,13 @@ Gets or sets the number of items displayed per page after pagination. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The number of items displayed per page after pagination. - property. The property specifies how many items the control displays per page. - - - -## Examples - The following code example shows how to use the property to render eight items of a 200-item list per page. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileLoadListEventArgsSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileLoadListEventArgsSample/vb/default.aspx" id="Snippet1"::: - + property. The property specifies how many items the control displays per page. + ]]> @@ -262,19 +254,11 @@ Gets the approximate weight of a single item in the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The approximate weight of a single item in the control. - property of a class to specify a new control weight. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobilePagedControlSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobilePagedControlSample/vb/Default.aspx" id="Snippet1"::: - + @@ -303,19 +287,11 @@ Occurs when a control is custom-paginated and needs more data. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - property to render eight items of a 200-item list per page. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileLoadListEventArgsSample/cs/default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileLoadListEventArgsSample/vb/default.aspx" id="Snippet1"::: - + @@ -374,11 +350,11 @@ An object defined by an object that contains event data. Called when the control is custom paginated and needs more data. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - event. Inheriting classes can override this method to retrieve the required data. - + event. Inheriting classes can override this method to retrieve the required data. + ]]> @@ -522,11 +498,11 @@ Gets the number of items that are visible on the current ASP.NET mobile Web Forms page. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The number of items that are visible on the current ASP.NET mobile Web Forms page. - diff --git a/xml/System.Web.UI.MobileControls/PagerStyle.xml b/xml/System.Web.UI.MobileControls/PagerStyle.xml index 760fa2ec304..44ccfa70628 100644 --- a/xml/System.Web.UI.MobileControls/PagerStyle.xml +++ b/xml/System.Web.UI.MobileControls/PagerStyle.xml @@ -214,25 +214,6 @@ ## Remarks The label can include the format specifier `{0}`, which is substituted with the page number of the next page when the label is rendered. - - -## Examples - The following example demonstrates how to the use the property to set the next page label to one more than the current page. - -```vb -Private Sub Form1_PageIndexChanged(sender As Object, e As EventArgs) - Form1.PagerStyle.NextPageText = (Form1.CurrentPage + 1) -End Sub -``` - -```csharp -void Form1_PageIndexChanged(object sender, EventArgs e) -{ - Form1.PagerStyle.NextPageText = - (Form1.CurrentPage + 1).ToString(); -} -``` - ]]> @@ -309,34 +290,6 @@ void Form1_PageIndexChanged(object sender, EventArgs e) > [!NOTE] > WML devices do not render this property. - - -## Examples - The following example demonstrates how to use the property to set the page label to "Go to page". - -```vb -Private Sub Page_Load(ByVal sender As System.Object, _ - ByVal e As System.EventArgs) Handles MyBase.Load - If Not IsPostBack - Form1.PagerStyle.NextPageText = "2" - End If - Form1.PagerStyle.StyleReference = "title" - Form1.PagerStyle.PageLabel = "Go to page" -End Sub -``` - -```csharp -void Page_Load(object sender, EventArgs e) -{ - if(!IsPostBack) - { - Form1.PagerStyle.NextPageText = "2"; - } - Form1.PagerStyle.StyleReference = "title"; - Form1.PagerStyle.PageLabel = "Go to page" -} -``` - ]]> @@ -409,28 +362,6 @@ void Page_Load(object sender, EventArgs e) ## Remarks The label can include the format specifier `{0}`, which is substituted with the page number of the previous page when the label is rendered. - - -## Examples - The following example demonstrates how to use the property to set the previous page label to one less than the current page. - -```vb -Sub Form1_PageIndexChanged(ByVal sender As Object, _ - ByVal e As EventArgs) - Form1.PagerStyle.PreviousPageText = _ - (Form1.CurrentPage - 1).ToString() -End Sub -``` - -```csharp -void Form1_PageIndexChanged(object sender, EventArgs e) -{ - Form1.PagerStyle.PreviousPageText = - (Form1.CurrentPage - 1).ToString(); - Form1.PagerStyle.NextPageText = (Form1.CurrentPage + 1).ToString(); -} -``` - ]]> diff --git a/xml/System.Web.UI.MobileControls/Panel.xml b/xml/System.Web.UI.MobileControls/Panel.xml index 7381e668946..98e25f28899 100644 --- a/xml/System.Web.UI.MobileControls/Panel.xml +++ b/xml/System.Web.UI.MobileControls/Panel.xml @@ -77,17 +77,6 @@ You can include literal text together with its accompanying markup tags in the text contents of the . For more information, see [Literal Text Inside Form Markup](https://learn.microsoft.com/previous-versions/aspnet/16khc3tx(v=vs.100)). - - -## Examples - The following code example demonstrates how to set properties for a panel during page load and how to define functions to manipulate properties for a panel so that they respond to command clicks. At page load, the code also looks for and modifies a label within a device-specific content template in a second panel. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobilePanelSample/cs/Default.aspx" id="Snippet1"::: - - You will also need to add this section to your Web.config file: - - - ]]> @@ -214,29 +203,8 @@ Returns a panel containing device-specific content. A content template must be defined and chosen for the target device. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The panel containing device-specific panel content. - - property to find a control when the page loads. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobilePanelSample/cs/Default.aspx" id="Snippet1"::: - - You will also need to add this section to your Web.config file: - - - - ]]> - + To be added. - Introduction to the Panel Control - Organizing Content with Containers - Introducing Control Templates - DeviceSpecific Element - <Choice> Element @@ -336,23 +304,9 @@ > [!NOTE] > To allow pagination in a control within a form, you must set to `true` in both the form and the panel. - - -## Examples - The following code example, when viewed on a device that paginates the pages, shows how a panel containing more controls than will fit on one page is paginated to allow users access to all items on the panel. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobilePanelSample/cs/Default2.aspx" id="Snippet3"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobilePanelSample/vb/Default2.aspx" id="Snippet3"::: - ]]> - Introduction to the Panel Control - Organizing Content with Containers - Introducing Control Templates diff --git a/xml/System.Web.UI.MobileControls/PhoneCall.xml b/xml/System.Web.UI.MobileControls/PhoneCall.xml index 6e07bfa7cd3..4e5269ba02a 100644 --- a/xml/System.Web.UI.MobileControls/PhoneCall.xml +++ b/xml/System.Web.UI.MobileControls/PhoneCall.xml @@ -75,16 +75,6 @@ On devices without telephony capability, the control renders alternate text, possibly including the phone number or a link; it is not treated as a command that has dialing capability. - - -## Examples - The following code example demonstrates how to add several phone numbers to a on your page. One control has an and the phone number appears as a link on devices that cannot make a phone call. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobilePhoneCallSample/cs/Default.aspx" id="Snippet1"::: - ]]> @@ -319,22 +309,16 @@ decoration_character ::= "(" | ")" | "." | "-" | {space} For `i-Mode` phones, the following rules currently apply when specifying a phone number: - The string must begin with "0" or "#". - - If the string begins with "0", the numbers are more than nine digits. - - If the string begins with "#", the numbers are more than three digits. - - The numbers can contain "(", ")" and "-" in the string. - - The string must be fewer than 24 characters. - The following list shows some examples of valid phone numbers: +The following list shows some examples of valid phone numbers: - 800.522.2920 - -- +1 (425) 885-8080 - -- +91335303197 +- +1 (425) 885-8080 +- +91335303197 ]]> diff --git a/xml/System.Web.UI.MobileControls/RegularExpressionValidator.xml b/xml/System.Web.UI.MobileControls/RegularExpressionValidator.xml index 36a59a1ff3e..a878989ea77 100644 --- a/xml/System.Web.UI.MobileControls/RegularExpressionValidator.xml +++ b/xml/System.Web.UI.MobileControls/RegularExpressionValidator.xml @@ -47,17 +47,6 @@ By default, controls on a form raise validator controls on the form to perform validation when the form is submitted to the server. To disable automatic validation, set the property on the to `false`. - - -## Examples - The following example shows how you can add regular expression properties, such as the and properties, programmatically during a page load. - -> [!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 language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileRegExprValidatorSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileRegExprValidatorSample/vb/Default.aspx" id="Snippet1"::: - ]]> diff --git a/xml/System.Web.UI.MobileControls/RequiredFieldValidator.xml b/xml/System.Web.UI.MobileControls/RequiredFieldValidator.xml index f5010d6a9be..61f71ab9ee7 100644 --- a/xml/System.Web.UI.MobileControls/RequiredFieldValidator.xml +++ b/xml/System.Web.UI.MobileControls/RequiredFieldValidator.xml @@ -47,17 +47,6 @@ By default, controls on a form raise validator controls on the form to perform validation when the form is submitted to the server. To disable automatic validation, set the property on the to `false`. - - -## Examples - The following code example requires a user to enter a number from 1 to 23. It uses both the and the to validate user entries. - -> [!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 language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileRegExprValidatorSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileRegExprValidatorSample/vb/Default.aspx" id="Snippet1"::: - ]]> diff --git a/xml/System.Web.UI.MobileControls/SelectionList.xml b/xml/System.Web.UI.MobileControls/SelectionList.xml index 7176b0aa40c..36f973ffe42 100644 --- a/xml/System.Web.UI.MobileControls/SelectionList.xml +++ b/xml/System.Web.UI.MobileControls/SelectionList.xml @@ -77,17 +77,6 @@ ## Remarks The class maintains the selection of single or multiple selected items. The is derived directly from the class and does not have any of the pagination handling properties, such as the property. - - -## Examples - In the following code example, the property of the class is an array of values that is created during the initial page load. You can change the setting of the property to see different versions of a . - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileListItemSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileListItemSample/vb/Default.aspx" id="Snippet1"::: - ]]> Introduction to the SelectionList Control @@ -745,17 +734,6 @@ ## Remarks The default value is 4; the minimum is 1, with no maximum. - - -## Examples - The following code example shows how to use the property on postback to expand the list. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileSelectionListSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileSelectionListSample/vb/Default.aspx" id="Snippet1"::: - ]]> an attempt was made to set the value to less than zero. @@ -861,17 +839,6 @@ ## Remarks Changing the selection on the client does not generate a postback event. This event is called on the server if a postback event is generated by some other control and the selection has changed. - - -## Examples - The following code example shows how to use the event. It also shows how to use the property on postback to expand the list. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileSelectionListSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileSelectionListSample/vb/Default.aspx" id="Snippet1"::: - ]]> @@ -972,22 +939,8 @@ |`MultipleSelectionListBox`|Renders list items in a list box with multiple selection capability.|Yes| |`Radio`|Renders list items as options.|No| - - -## Examples - The following code example shows how to use the event. It also shows how to use the property on postback to expand the list. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Syntax Overview](https://learn.microsoft.com/previous-versions/aspnet/k33801s3(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileSelectionListSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileSelectionListSample/vb/Default.aspx" id="Snippet1"::: - ]]> - Introduction to the SelectionList Control - Creating New Controls - Creating Custom Mobile Controls diff --git a/xml/System.Web.UI.MobileControls/Style.xml b/xml/System.Web.UI.MobileControls/Style.xml index f9c463ba9c8..e45193c67af 100644 --- a/xml/System.Web.UI.MobileControls/Style.xml +++ b/xml/System.Web.UI.MobileControls/Style.xml @@ -45,25 +45,16 @@ Organizes style characteristics of an ASP.NET mobile control. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - class contains style characteristics common to all mobile controls. Classes that inherit from the class contain additional style characteristics specific to their associated control. - - Due to the diversity of devices supported by mobile controls, all style properties are advisory, and might or might not be honored depending on the capabilities of the target device. - - - -## Examples - The following example demonstrates three user-defined styles in a object. A object holds three values that correspond to the three defined styles. The `OnClick` command event calls the `SelectStyle` function, which changes the property of the object. - - [!code-aspx-csharp[MobileStyleSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileStyleSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileStyleSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileStyleSample/vb/Default.aspx#1)] - + class contains style characteristics common to all mobile controls. Classes that inherit from the class contain additional style characteristics specific to their associated control. + + Due to the diversity of devices supported by mobile controls, all style properties are advisory, and might or might not be honored depending on the capabilities of the target device. + ]]> - Introduction to the StyleSheet Control @@ -109,11 +100,11 @@ The object to be set as the value of . Sets the property to the specified object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - method does not support multiple objects and will throw an if the property is not `null` when is called. - + method does not support multiple objects and will throw an if the property is not `null` when is called. + ]]> The property is not . @@ -155,18 +146,18 @@ Gets or sets the specified alignment for the style. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. An enumerated value representing the specified alignment for the style. - property can be set to any of the following values: - -|Value|Description| -|-----------|-----------------| -||No alignment is set for the specified object.| -||Aligns to the left.| -||Aligns to the center.| -||Aligns to the right.| - + property can be set to any of the following values: + +|Value|Description| +|-----------|-----------------| +||No alignment is set for the specified object.| +||Aligns to the left.| +||Aligns to the center.| +||Aligns to the right.| + ]]> @@ -220,19 +211,19 @@ The control to which the style properties are applied. Applies the properties of a style to a control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - |The size of the font.| -||Whether the font is bold.| -||Whether the font is italic.| -||The foreground color.| -||The background color.| - + |The size of the font.| +||Whether the font is bold.| +||Whether the font is italic.| +||The foreground color.| +||The background color.| + ]]> Introduction to the StyleSheet Control @@ -277,11 +268,11 @@ Gets or sets the specified background color for the style. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The specified background color for the style. - property is not inherited from its parent. For example, if you set the property to cyan on a parent control, a child control will not inherit a background color of cyan; you must explicitly set the child control's `BackColor` property to cyan, or you must set the property of the parent control and apply the style sheet to the child control. This is consistent with the behavior of cascading style sheets. - + property is not inherited from its parent. For example, if you set the property to cyan on a parent control, a child control will not inherit a background color of cyan; you must explicitly set the child control's `BackColor` property to cyan, or you must set the property of the parent control and apply the style sheet to the child control. This is consistent with the behavior of cascading style sheets. + ]]> Introduction to the StyleSheet Control @@ -392,11 +383,11 @@ Returns a strongly typed reference to the associated control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. A strongly typed reference to the associated control. - Introduction to the StyleSheet Control @@ -472,18 +463,18 @@ Returns a object that contains font information about the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. An enumerated value specifying the font information about the control. - class has the following properties: - -|Property|Description| -|--------------|-----------------| -||Whether the font is bold.| -||Whether the font is italic.| -||An identifier for this font instance.| -||The font size.| - + class has the following properties: + +|Property|Description| +|--------------|-----------------| +||Whether the font is bold.| +||Whether the font is italic.| +||An identifier for this font instance.| +||The font size.| + ]]> @@ -577,13 +568,13 @@ Gets or sets the specified foreground color for the style. Typically, this property sets the color for the text. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The specified foreground color for the style. - property to display text in different colors. The strings that can be used for colors are a set of fixed colors and hexadecimal RGB values. These values can also be specified as "#bb7023". - - You can also use the Microsoft Windows color constants. - + property to display text in different colors. The strings that can be used for colors are a set of fixed colors and hexadecimal RGB values. These values can also be specified as "#bb7023". + + You can also use the Microsoft Windows color constants. + ]]> Introduction to the StyleSheet Control @@ -637,11 +628,11 @@ Returns the template with the specified name. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The template with the specified name. - Introduction to the StyleSheet Control @@ -679,11 +670,11 @@ if the style has an active template set; otherwise, . - ](https://learn.microsoft.com/previous-versions/aspnet/26s26ahw(v=vs.100)) element with a `` element successfully evaluated for the target device. The selected choice must have templates defined. - + ](https://learn.microsoft.com/previous-versions/aspnet/26s26ahw(v=vs.100)) element with a `` element successfully evaluated for the target device. The selected choice must have templates defined. + ]]> @@ -830,11 +821,11 @@ The object containing the view-state information. Loads the view state into the of the object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - Introduction to the StyleSheet Control @@ -909,22 +900,13 @@ Registers a style property and returns a unique key for lookup. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. A unique key for lookup. - method to register a string property that supports inheritance and whose default value is an empty string (""). This incomplete example includes a public property, whose implementation accesses an element of this property by using the default indexer property of the base class. - - [!code-csharp[MobileStyleSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileStyleSample/cs/Default2.aspx#2)] - [!code-vb[MobileStyleSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileStyleSample/vb/Default2.aspx#2)] - + - Introduction to the StyleSheet Control @@ -1014,11 +996,11 @@ Gets or sets a reference to the style properties for a . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. A reference to the style properties for a object. - property must be the property of a object. You can use the property to share styles across controls, either by using inheritance or by using the property of a style sheet. For more information, see [Styles](https://learn.microsoft.com/previous-versions/aspnet/6854a8as(v=vs.100)) and [Creating New Styles](https://learn.microsoft.com/previous-versions/aspnet/c0dtftb6(v=vs.100)). - + property must be the property of a object. You can use the property to share styles across controls, either by using inheritance or by using the property of a style sheet. For more information, see [Styles](https://learn.microsoft.com/previous-versions/aspnet/6854a8as(v=vs.100)) and [Creating New Styles](https://learn.microsoft.com/previous-versions/aspnet/c0dtftb6(v=vs.100)). + ]]> Introduction to the StyleSheet Control @@ -1051,11 +1033,11 @@ The parsed subobject to be added. For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> Introduction to the StyleSheet Control @@ -1085,11 +1067,11 @@ if a server control is tracking its view state changes; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -1121,11 +1103,11 @@ The object representing the view state to be loaded. For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> Introduction to the StyleSheet Control @@ -1156,11 +1138,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. The object that contains the view state changes. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -1191,11 +1173,11 @@ For a description of this member, see . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - instance is cast to an interface. - + instance is cast to an interface. + ]]> Introduction to the StyleSheet Control @@ -1221,11 +1203,11 @@ Turns on the tracking of view state in the object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. - property to `true`. It also calls the method on the object referenced by the property. - + property to `true`. It also calls the method on the object referenced by the property. + ]]> Introduction to the StyleSheet Control @@ -1266,17 +1248,17 @@ Gets or sets the specified wrapping mode for the style. The default value is . This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. An enumerated value that specifies the wrapping mode for the style. - enumerations. - -|Enumeration|Value|Description| -|-----------------|-----------|-----------------| -||0|No size is set for the specified object. This is the default value.| -||1|Wrap to the next line.| -||2|The text is not wrapped to the next line.| - + enumerations. + +|Enumeration|Value|Description| +|-----------------|-----------|-----------------| +||0|No size is set for the specified object. This is the default value.| +||1|Wrap to the next line.| +||2|The text is not wrapped to the next line.| + ]]> Introduction to the StyleSheet Control diff --git a/xml/System.Web.UI.MobileControls/StyleSheet.xml b/xml/System.Web.UI.MobileControls/StyleSheet.xml index c6756f6a25c..7979371b352 100644 --- a/xml/System.Web.UI.MobileControls/StyleSheet.xml +++ b/xml/System.Web.UI.MobileControls/StyleSheet.xml @@ -54,18 +54,9 @@ > [!NOTE] > The control ignores its own style attributes; setting a style attribute on the itself has no effect on the styles contained as children within the control. - - -## Examples - The following example shows how you can add Style properties to a control during the `Page_Load` event. - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileStyleSheetSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileStyleSheetSample/vb/Default.aspx" id="Snippet1"::: - ]]> - Introduction to the StyleSheet Control diff --git a/xml/System.Web.UI.MobileControls/TemplateContainer.xml b/xml/System.Web.UI.MobileControls/TemplateContainer.xml index 94d0f2200f8..2346e78390e 100644 --- a/xml/System.Web.UI.MobileControls/TemplateContainer.xml +++ b/xml/System.Web.UI.MobileControls/TemplateContainer.xml @@ -37,25 +37,6 @@ ## Remarks If a mobile control provides templated rendering features through device templates, it must create instances of each template inside a separate control of type . If a data-binding expression is in a control in a template, the `Container` variable of the expression is always of type . - - -## Examples - The following code example demonstrates how to use objects to create templates within a object in a mobile form. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileTemplateContainerSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileTemplateContainerSample/vb/Default.aspx" id="Snippet1"::: - - All of the code above can be replaced declaratively with the following markup: - - - - The Web.config file must have the following lines: - - - ]]> diff --git a/xml/System.Web.UI.MobileControls/TextBox.xml b/xml/System.Web.UI.MobileControls/TextBox.xml index 5b5dfadcf7b..8e65275d917 100644 --- a/xml/System.Web.UI.MobileControls/TextBox.xml +++ b/xml/System.Web.UI.MobileControls/TextBox.xml @@ -491,14 +491,6 @@ ## Remarks When the user changes the text of a , this event is not raised immediately. The form must contain a to initiate a postback event that raises the event. - - -## Examples - The following example demonstrates how to use the event to change the items in a . - - :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/MobileTextBoxSample/cs/Default.aspx" id="Snippet1"::: - :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/MobileTextBoxSample/vb/Default.aspx" id="Snippet1"::: - ]]> diff --git a/xml/System.Web.UI.MobileControls/TextView.xml b/xml/System.Web.UI.MobileControls/TextView.xml index 6dbb104d4fd..0da40c81b3a 100644 --- a/xml/System.Web.UI.MobileControls/TextView.xml +++ b/xml/System.Web.UI.MobileControls/TextView.xml @@ -76,27 +76,10 @@ > [!CAUTION] > This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see [Securing Standard Controls](https://learn.microsoft.com/previous-versions/aspnet/ms178270(v=vs.100)), [How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings](https://learn.microsoft.com/previous-versions/aspnet/a2a4yykt(v=vs.100)), and [Validating User Input in ASP.NET Web Pages](https://learn.microsoft.com/previous-versions/aspnet/7kh55542(v=vs.100)). - - -## Examples - The following code example creates numbers and identifies each prime number in a sentence, and adds those sentences to the control. The example also uses custom pagination to provide only a page full of text at a time. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileTextViewSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileTextViewSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileTextViewSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileTextViewSample/vb/Default.aspx#1)] - ]]> - Pagination - Literal Text Inside Form Markup - Introduction to the TextView Control - Architectural Overview of Adaptive Control Behavior - Adapter Sets Functionality - Control and Adapter Interaction @@ -349,23 +332,9 @@ Mobile controls that support internal pagination also provide a feature called custom pagination. Normally, such controls require you to provide them all the data that they can display. Developers specify the total number of items that are in the list in the property. The property specifies how many items the control displays per page. - - -## Examples - The following code example sets the number of items for each postback. This example is part of a larger example for the class overview. - - [!code-csharp[MobileTextViewSample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileTextViewSample/cs/Default.aspx#2)] - [!code-vb[MobileTextViewSample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileTextViewSample/vb/Default.aspx#2)] - ]]> - Pagination - Working With Deck Size Limits - Introduction to the TextView Control - Architectural Overview of Adaptive Control Behavior - Adapter Sets Functionality - Control and Adapter Interaction @@ -511,23 +480,8 @@ ## Remarks When control is custom-paginated, you do not explicitly bind the control. After pagination, the control raises this event, indicating what part of the data is required. The application can handle this event and bind the control with the required data. - - -## Examples - The following code example demonstrates how to create custom pagination and call the method to load a specified number of items per page. - -> [!NOTE] -> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)). - - [!code-aspx-csharp[MobileTextViewSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileTextViewSample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileTextViewSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileTextViewSample/vb/Default.aspx#1)] - ]]> - Introduction to the TextView Control - Architectural Overview of Adaptive Control Behavior - Adapter Sets Functionality - Control and Adapter Interaction diff --git a/xml/System.Web.UI.MobileControls/ValidationSummary.xml b/xml/System.Web.UI.MobileControls/ValidationSummary.xml index 4d755e93656..11b49e4f285 100644 --- a/xml/System.Web.UI.MobileControls/ValidationSummary.xml +++ b/xml/System.Web.UI.MobileControls/ValidationSummary.xml @@ -59,20 +59,8 @@ Although the class of the ASP.NET mobile controls mimics the behavior of the Web Forms class in many ways, the mobile controls version of the class does not inherit directly from the Web Forms version of the class. Thus, properties that modify the output of the validation summary, such as the property, are not available in mobile controls. The mobile controls version of the summary is derived directly from the class. - - -## Examples - The following code example demonstrates how to create an instance of a class, and add it to a form in an ASP.NET mobile Web application during a page load. The user-defined `Page_Load` event handler determines if there is an error, and then either launches the form containing the , or the congratulatory thank you form. - -> [!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-aspx-csharp[MobileValidationSummarySample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileValidationSummarySample/cs/Default.aspx#1)] - [!code-aspx-vb[MobileValidationSummarySample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileValidationSummarySample/vb/Default.aspx#1)] - ]]> - Introduction to the ValidationSummary Control @@ -131,17 +119,8 @@ ## Remarks When an error occurs during the rendering of a form, the validation process uses the text in the property as the string that is displayed on the validation summary page. - - -## Examples - The following code example demonstrates how to use the property to specify the link text in a to return to the form with the error. - - [!code-csharp[MobileValidationSummarySample#2](~/snippets/csharp/VS_Snippets_WebNet/MobileValidationSummarySample/cs/Default.aspx#2)] - [!code-vb[MobileValidationSummarySample#2](~/snippets/visualbasic/VS_Snippets_WebNet/MobileValidationSummarySample/vb/Default.aspx#2)] - ]]> - Introduction to the ValidationSummary Control diff --git a/xml/System.Web/AspNetHostingPermission.xml b/xml/System.Web/AspNetHostingPermission.xml index cdbcadc5530..6987280acf1 100644 --- a/xml/System.Web/AspNetHostingPermission.xml +++ b/xml/System.Web/AspNetHostingPermission.xml @@ -47,28 +47,20 @@ Controls access permissions in ASP.NET hosted environments. This class cannot be inherited. - class is used in conjunction with code access security to help protect public types in the System.Web namespaces. Code must be assigned at least the trust level to access protected ASP.NET classes. - - The class's property is set by configuring the appropriate trust level in the [trust](https://learn.microsoft.com/previous-versions/dotnet/netframework-1.1/tkscy493(v%3dvs.71)) configuration element. By default, the `level` attribute of the `trust` configuration element is set to `Full`. That is, by default, ASP.NET applications run under the level. When an ASP.NET application domain is created, ASP.NET reads the value specified for the `level` attribute of the `trust` configuration element, creates an instance of the class with the specified attribute, and then adds the class to the permission set for the application domain. For more information, see [ASP.NET Trust Levels and Policy Files](/previous-versions/wyts434y(v=vs.140)). - - It is recommended that you set the `level` attribute of the `trust` configuration element to `High` for sites that are trusted. For sites that are not trusted, such as a Web server that hosts sites that run code from an external customer, it is recommended that you set the `level` attribute of the `trust` configuration element to `Medium`. - - The permission sets that are defined by default for the .NET Framework (for example, LocalIntranet, Internet, and so on) do not include the permission. That is, the permission is only assigned, by default, to applications that are running under `Full` trust. - - - -## Examples - The following code example shows a class protected using the permission. Code must be running with at least permission in order to create an instance of the class. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.AspNetHostingPermission/CS/CustomAspNetClass.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.AspNetHostingPermission/VB/CustomAspNetClass.vb" id="Snippet1"::: - + The class is used in conjunction with code access security to help protect public types in the System.Web namespaces. Code must be assigned at least the trust level to access protected ASP.NET classes. + + The class's property is set by configuring the appropriate trust level in the [trust](https://learn.microsoft.com/previous-versions/dotnet/netframework-1.1/tkscy493(v%3dvs.71)) configuration element. By default, the `level` attribute of the `trust` configuration element is set to `Full`. That is, by default, ASP.NET applications run under the level. When an ASP.NET application domain is created, ASP.NET reads the value specified for the `level` attribute of the `trust` configuration element, creates an instance of the class with the specified attribute, and then adds the class to the permission set for the application domain. For more information, see [ASP.NET Trust Levels and Policy Files](/previous-versions/wyts434y(v=vs.140)). + + It is recommended that you set the `level` attribute of the `trust` configuration element to `High` for sites that are trusted. For sites that are not trusted, such as a Web server that hosts sites that run code from an external customer, it is recommended that you set the `level` attribute of the `trust` configuration element to `Medium`. + + The permission sets that are defined by default for the .NET Framework (for example, LocalIntranet, Internet, and so on) do not include the permission. That is, the permission is only assigned, by default, to applications that are running under `Full` trust. + ]]> @@ -228,19 +220,19 @@ The containing the XML encoding to use to reconstruct the permission object. Reconstructs a permission object with a specified state from an XML encoding. - is . - The property of is not equal to "IPermission". - --or- - + The property of is not equal to "IPermission". + +-or- + The class of is or an empty string (""). From c5b95006c08877fe46bfe9429c453c4cd66eb3fb Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Sat, 21 Jun 2025 08:25:26 +0200 Subject: [PATCH 2/4] delete orphaned snippet files --- .../SDKSampleLibrary/Class1.cs | 90 -- .../SDKSampleLibrary/SDKSampleLibrary.csproj | 14 - .../DefaultMetadata/XAMLAPP.sln | 41 - .../DefaultMetadata/XamlApp/XAMLAPP.csproj | 46 - .../DefaultMetadata/XamlApp/app.xaml | 3 - .../DefaultMetadata/XamlApp/default.xaml | 41 - .../DefaultMetadata/XamlApp/default.xaml.cs | 50 - .../DefaultMetadata/XamlApp/page2.xaml | 74 - .../DefaultMetadata/XamlApp/page2.xaml.cs | 96 -- .../DefaultMetadata/XamlApp/sampleid.txt | 1 - .../DefaultMetadata/snippets.5000.json | 3 - .../Setter/TargetName/ColorPickerApp.sln | 31 - .../ColorPickerApp/ColorPickerApp.csproj | 70 - .../TargetName/ColorPickerApp/MyApp.xaml | 188 --- .../TargetName/ColorPickerApp/MyApp.xaml.cs | 50 - .../ColorPickerApp/Properties/AssemblyInfo.cs | 46 - .../TargetName/ColorPickerApp/Window1.xaml | 68 - .../TargetName/ColorPickerApp/Window1.xaml.cs | 39 - .../TargetName/ColorPickerLib/ColorPicker.cs | 220 --- .../ColorPickerLib/ColorPickerLib.csproj | 14 - .../ColorPickerLib/Themes/generic.xaml | 120 -- .../Setter/TargetName/snippets.5000.json | 3 - .../cs/designertestclient.sln | 41 - .../cs/designertestclient/app.config | 10 - .../designertestclient.csproj | 76 - .../cs/designertestclient/program.cs | 30 - .../properties/assemblyinfo.cs | 30 - .../cs/designertestclient/workflow1.xaml | 48 - .../Designer/parallelforeachdesigner.xaml | 66 - .../Designer/parallelforeachdesigner.xaml.cs | 19 - .../parallelforeachwithbodyfactory.cs | 27 - .../nongenericparallelforeach.csproj | 16 - .../cs/parallelforeach/parallelforeach.cs | 143 -- .../cs/snippets.5000.json | 3 - .../CS/smtpmailsend.cs | 43 - .../CS/CustomAspNetClass.cs | 10 - .../CS/passportauthentication.cs | 45 - .../CS/attachmentsample.cs | 25 - .../CS/systemwebmailmailmessagebcc.cs | 16 - .../systemwebmailmailmessagebodyencoding.cs | 17 - .../CS/systemwebmailmailmessagebodyformat.cs | 17 - .../CS/systemwebmailmailmessagecc.cs | 16 - .../CS/systemwebmailmailmessagepriority.cs | 16 - .../systemwebmailmailmessageurlcontentbase.cs | 16 - .../CS/systemwebmailsmtpmailsmtpserver.cs | 17 - .../CS/systemwebmailsmtpmail.cs | 64 - .../CS/passportidentity_authurl.cs | 18 - .../CS/passportidentity_authurl2.cs | 18 - ...assportidentity_getdomainfrommembername.cs | 19 - .../CS/passportidentity_hassavedpassword.cs | 19 - .../CS/passportidentity_isauthenticated.cs | 19 - .../CS/passportidentity_logotag.cs | 19 - .../CS/passportidentity_logotag2.cs | 19 - .../CS/passportidentity_name.cs | 19 - .../CS/passportidentity_signout.cs | 20 - .../CS/passportidentity_ticketage.cs | 19 - .../CS/passportidentity_timesincesignin.cs | 19 - .../CS/systemwebmailmailattachment.cs | 29 - .../CS/systemwebmailmailmessagefrom.cs | 16 - .../CS/systemwebmailmailmessageto.cs | 16 - .../VB/smtpmailsend.vb | 40 - .../VB/CustomAspNetClass.vb | 9 - .../VB/passportauthentication.vb | 46 - .../VB/attachmentsample.vb | 17 - .../VB/systemwebmailmailmessagebcc.vb | 12 - .../systemwebmailmailmessagebodyencoding.vb | 13 - .../VB/systemwebmailmailmessagebodyformat.vb | 12 - .../VB/systemwebmailmailmessagecc.vb | 12 - .../VB/systemwebmailmailmessagepriority.vb | 12 - .../systemwebmailmailmessageurlcontentbase.vb | 12 - .../VB/systemwebmailsmtpmailsmtpserver.vb | 13 - .../VB/systemwebmailsmtpmail.vb | 53 - .../VB/Project.vbproj | 14 - .../VB/imembershipprovider.vb | 1410 ---------------- .../VB/newuser.vb | 1421 ----------------- .../VB/passportidentity_authurl.vb | 16 - .../VB/passportidentity_authurl2.vb | 16 - ...assportidentity_getdomainfrommembername.vb | 20 - .../VB/passportidentity_hassavedpassword.vb | 16 - .../VB/passportidentity_isauthenticated.vb | 16 - .../VB/passportidentity_logotag.vb | 16 - .../VB/passportidentity_logotag2.vb | 16 - .../VB/passportidentity_name.vb | 15 - .../VB/passportidentity_signout.vb | 16 - .../VB/passportidentity_ticketage.vb | 16 - .../VB/passportidentity_timesincesignin.vb | 15 - .../VB/systemwebmailmailattachment.vb | 26 - .../VB/systemwebmailmailmessagefrom.vb | 12 - .../VB/systemwebmailmailmessageto.vb | 12 - 89 files changed, 5712 deletions(-) delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/Class1.cs delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/SDKSampleLibrary.csproj delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XAMLAPP.sln delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/XAMLAPP.csproj delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/app.xaml delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/default.xaml delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/default.xaml.cs delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/page2.xaml delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/page2.xaml.cs delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/sampleid.txt delete mode 100644 snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/snippets.5000.json delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp.sln delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/ColorPickerApp.csproj delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/MyApp.xaml delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/MyApp.xaml.cs delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Properties/AssemblyInfo.cs delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Window1.xaml delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Window1.xaml.cs delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerLib/ColorPicker.cs delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerLib/ColorPickerLib.csproj delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/ColorPickerLib/Themes/generic.xaml delete mode 100644 snippets/csharp/System.Windows/Setter/TargetName/snippets.5000.json delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient.sln delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient/app.config delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient/designertestclient.csproj delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient/program.cs delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient/properties/assemblyinfo.cs delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/designertestclient/workflow1.xaml delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/parallelforeach/Designer/parallelforeachdesigner.xaml delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/parallelforeach/Designer/parallelforeachdesigner.xaml.cs delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/parallelforeach/Designer/parallelforeachwithbodyfactory.cs delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/parallelforeach/nongenericparallelforeach.csproj delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/parallelforeach/parallelforeach.cs delete mode 100644 snippets/csharp/VS_Snippets_CFX/wfs_nongenericparallelforeach/cs/snippets.5000.json delete mode 100644 snippets/csharp/VS_Snippets_WebNet/Classic SmtpMail.Send Example/CS/smtpmailsend.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.AspNetHostingPermission/CS/CustomAspNetClass.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/CS/passportauthentication.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Attachments/CS/attachmentsample.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Bcc/CS/systemwebmailmailmessagebcc.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.BodyEncoding/CS/systemwebmailmailmessagebodyencoding.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.BodyFormat/CS/systemwebmailmailmessagebodyformat.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Cc/CS/systemwebmailmailmessagecc.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Priority/CS/systemwebmailmailmessagepriority.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.MailMessage.UrlContentBase/CS/systemwebmailmailmessageurlcontentbase.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.SmtpMail.SmtpServer/CS/systemwebmailsmtpmailsmtpserver.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Mail.SmtpMail/CS/systemwebmailsmtpmail.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.AuthUrl/CS/passportidentity_authurl.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.AuthUrl2/CS/passportidentity_authurl2.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.GetDomainFromMemberName/CS/passportidentity_getdomainfrommembername.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.HasSavedPassword/CS/passportidentity_hassavedpassword.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.IsAuthenticated/CS/passportidentity_isauthenticated.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.LogoTag/CS/passportidentity_logotag.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.LogoTag2/CS/passportidentity_logotag2.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.Name/CS/passportidentity_name.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.SignOut/CS/passportidentity_signout.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.TicketAge/CS/passportidentity_ticketage.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.TimeSinceSignIn/CS/passportidentity_timesincesignin.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/SystemWebMailMailAttachment/CS/systemwebmailmailattachment.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/SystemWebMailMailMessageFrom/CS/systemwebmailmailmessagefrom.cs delete mode 100644 snippets/csharp/VS_Snippets_WebNet/SystemWebMailMailMessageTo/CS/systemwebmailmailmessageto.cs delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/Classic SmtpMail.Send Example/VB/smtpmailsend.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.AspNetHostingPermission/VB/CustomAspNetClass.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.PassportAuthentication/VB/passportauthentication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Attachments/VB/attachmentsample.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Bcc/VB/systemwebmailmailmessagebcc.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.BodyEncoding/VB/systemwebmailmailmessagebodyencoding.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.BodyFormat/VB/systemwebmailmailmessagebodyformat.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Cc/VB/systemwebmailmailmessagecc.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.Priority/VB/systemwebmailmailmessagepriority.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.MailMessage.UrlContentBase/VB/systemwebmailmailmessageurlcontentbase.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.SmtpMail.SmtpServer/VB/systemwebmailsmtpmailsmtpserver.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Mail.SmtpMail/VB/systemwebmailsmtpmail.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.IMembershipProvider/VB/Project.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.IMembershipProvider/VB/imembershipprovider.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.MembershipUser.Constructor/VB/newuser.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.AuthUrl/VB/passportidentity_authurl.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.AuthUrl2/VB/passportidentity_authurl2.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.GetDomainFromMemberName/VB/passportidentity_getdomainfrommembername.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.HasSavedPassword/VB/passportidentity_hassavedpassword.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.IsAuthenticated/VB/passportidentity_isauthenticated.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.LogoTag/VB/passportidentity_logotag.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.LogoTag2/VB/passportidentity_logotag2.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.Name/VB/passportidentity_name.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.SignOut/VB/passportidentity_signout.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.TicketAge/VB/passportidentity_ticketage.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/System.Web.Security.PassportIdentity.TimeSinceSignIn/VB/passportidentity_timesincesignin.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/SystemWebMailMailAttachment/VB/systemwebmailmailattachment.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/SystemWebMailMailMessageFrom/VB/systemwebmailmailmessagefrom.vb delete mode 100644 snippets/visualbasic/VS_Snippets_WebNet/SystemWebMailMailMessageTo/VB/systemwebmailmailmessageto.vb diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/Class1.cs b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/Class1.cs deleted file mode 100644 index c093dd47c29..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/Class1.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; - -namespace SDKSample -{ - // - public class MyStateControl : ButtonBase - { - public MyStateControl() : base() { } - public Boolean State - { - get { return (Boolean)this.GetValue(StateProperty); } - set { this.SetValue(StateProperty, value); } - } - public static readonly DependencyProperty StateProperty = DependencyProperty.Register( - "State", typeof(Boolean), typeof(MyStateControl), new PropertyMetadata(false)); - } - // - - // - public class UnrelatedStateControl : Control - { - public UnrelatedStateControl() { } - public static readonly DependencyProperty StateProperty = MyStateControl.StateProperty.AddOwner(typeof(UnrelatedStateControl), new PropertyMetadata(true)); - public Boolean State - { - get { return (Boolean)this.GetValue(StateProperty); } - set { this.SetValue(StateProperty, value); } - } - } - // - - // - public class MyAdvancedStateControl : MyStateControl - { - public MyAdvancedStateControl() : base() { } - static MyAdvancedStateControl() - { - MyStateControl.StateProperty.OverrideMetadata(typeof(MyAdvancedStateControl), new PropertyMetadata(true)); - } - } - // - public class AreaButton : Button - { - // - static AreaButton() - { - WidthProperty.OverrideMetadata(typeof(AreaButton), new FrameworkPropertyMetadata(new PropertyChangedCallback(InvalidateAreaProperty))); - HeightProperty.OverrideMetadata(typeof(AreaButton), new FrameworkPropertyMetadata(new PropertyChangedCallback(InvalidateAreaProperty))); - } - static void InvalidateAreaProperty(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - d.InvalidateProperty(AreaProperty); - } - // - public double Area - { - get { return (double)this.GetValue(AreaProperty); } - } - private static readonly DependencyPropertyKey AreaPropertyKey = DependencyProperty.RegisterReadOnly( - "Area", - typeof(double), - typeof(AreaButton), - new PropertyMetadata(0.0, null, new CoerceValueCallback(CalculateArea)) - ); - private static object CalculateArea(object d, object previousValue) - { - FrameworkElement fe = d as FrameworkElement; - if (fe != null) - { - return (fe.ActualWidth * fe.ActualHeight); - } - else - { - return null; - } - } - - public static readonly DependencyProperty AreaProperty = AreaPropertyKey.DependencyProperty; - protected override void OnClick() - { - this.Width += 1; - this.Height += 1; - base.OnClick(); - this.Content = GetValue(AreaProperty).ToString(); - } - } -} diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/SDKSampleLibrary.csproj b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/SDKSampleLibrary.csproj deleted file mode 100644 index 7c3c390d624..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/SDKSampleLibrary/SDKSampleLibrary.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net4.8 - SDKSample - - - - - - - - - diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XAMLAPP.sln b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XAMLAPP.sln deleted file mode 100644 index e3cb77c816d..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XAMLAPP.sln +++ /dev/null @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.2.32602.215 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XAMLAPP", "XamlApp\XAMLAPP.csproj", "{AECDF9E6-8952-4583-9BB4-A304B1E46831}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDKSampleLibrary", "SDKSampleLibrary\SDKSampleLibrary.csproj", "{055BED46-02DB-473C-97AB-EA713968A7C6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Debug|Any CPU.ActiveCfg = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Debug|Any CPU.Build.0 = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Debug|x86.ActiveCfg = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Debug|x86.Build.0 = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Release|Any CPU.ActiveCfg = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Release|Any CPU.Build.0 = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Release|x86.ActiveCfg = Debug|x86 - {AECDF9E6-8952-4583-9BB4-A304B1E46831}.Release|x86.Build.0 = Debug|x86 - {055BED46-02DB-473C-97AB-EA713968A7C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Debug|x86.ActiveCfg = Debug|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Debug|x86.Build.0 = Debug|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Release|Any CPU.Build.0 = Release|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Release|x86.ActiveCfg = Release|Any CPU - {055BED46-02DB-473C-97AB-EA713968A7C6}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61524242-572B-4BBE-80F7-FA1C03DA1856} - EndGlobalSection -EndGlobal diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/XAMLAPP.csproj b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/XAMLAPP.csproj deleted file mode 100644 index df62802453c..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/XAMLAPP.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - PropertySystemEsoterics - winexe - Debug - bin\$(Configuration)\ - {AECDF9E6-8952-4583-9BB4-A304B1E46831} - v4.8 - - 10.0.20821 - - - - - - - - - - - - - - page2.xaml - - - - - - - - - - - 4.0 - - - - - - - {31b64cda-8444-4185-86aa-b0673eb3b143} - SDKSampleLibrary - - - \ No newline at end of file diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/app.xaml b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/app.xaml deleted file mode 100644 index 95a03dca082..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/app.xaml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/default.xaml b/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/default.xaml deleted file mode 100644 index c287055da0e..00000000000 --- a/snippets/csharp/System.Windows/DependencyProperty/DefaultMetadata/XamlApp/default.xaml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/MyApp.xaml.cs b/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/MyApp.xaml.cs deleted file mode 100644 index 81c5abc1825..00000000000 --- a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/MyApp.xaml.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Windows; -using System.Configuration; -using System.ComponentModel; -using System.Windows.Media; -using System.Windows.Data; - -namespace ColorPickerApp -{ - /// - /// Interaction logic for MyApp.xaml - /// - - public partial class MyApp : Application - { - void AppStartup(object sender, StartupEventArgs args) - { - Window1 mainWindow = new Window1(); - mainWindow.Show(); - } - } - public class ColorGradientConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - string param = parameter as string; - Color color = (Color)value; - if (param != null) - { - switch (param) - { - case "Red": - return new LinearGradientBrush(Color.FromRgb(0, color.G, color.B), Color.FromRgb(255, color.G, color.B), 0); - case "Green": - return new LinearGradientBrush(Color.FromRgb(color.R, 0, color.B), Color.FromRgb(color.R, 255, color.B), 0); - case "Blue": - return new LinearGradientBrush(Color.FromRgb(color.R, color.G, 0), Color.FromRgb(color.R, color.G, 255), 0); - default: - throw new ArgumentException("not valid value", "parameter"); - } - } - throw new ArgumentException("parameter not a string"); - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotSupportedException(); - } - } -} \ No newline at end of file diff --git a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Properties/AssemblyInfo.cs b/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Properties/AssemblyInfo.cs deleted file mode 100644 index a880eda321d..00000000000 --- a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ColorPickerApp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("MSFT")] -[assembly: AssemblyProduct("ColorPickerApp")] -[assembly: AssemblyCopyright("Copyright @ MSFT 2005")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -//This attribute describes where any theme specific and generic resource dictionaries can be found. -[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Window1.xaml b/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Window1.xaml deleted file mode 100644 index 363f0f769a6..00000000000 --- a/snippets/csharp/System.Windows/Setter/TargetName/ColorPickerApp/Window1.xaml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These buttons are bounds to the CLR properties exposed on the ColorPicker. - -