diff --git a/xml/System.ComponentModel.DataAnnotations/DisplayFormatAttribute.xml b/xml/System.ComponentModel.DataAnnotations/DisplayFormatAttribute.xml index d86a462100e..0df707a8673 100644 --- a/xml/System.ComponentModel.DataAnnotations/DisplayFormatAttribute.xml +++ b/xml/System.ComponentModel.DataAnnotations/DisplayFormatAttribute.xml @@ -52,18 +52,15 @@ When you apply this attribute to a data field, you must follow the guidelines for the use of the attributes. For more information, see [ASP.NET Dynamic Data Guidelines](/previous-versions/aspnet/cc668215(v=vs.100)). ## Examples - See an online example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.ComponentModel.DataAnnotations.DisplayFormatAttribute). - The following example shows how to use the to customize formatting for a data field. The example performs the following steps: +The following example shows how to use the to customize formatting for a data field. The example performs the following steps: - Implements a metadata partial class and an associated metadata class. - In the associated metadata class, it applies the attribute to specify the following results: - Display the text "[Null]" when a data field is empty. - - Display currency data in locale specific currency format. - - Display date information in short format (mm/dd/yy). This format also applies in edit mode. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DisplayFormatAttribute/CS/product.cs" id="Snippet1"::: @@ -72,9 +69,7 @@ To compile the example, you need the following: - Any edition of Visual Studio 2010 or later. - - The AdventureWorksLT sample database. For information about how to download and install the SQL Server sample database, see [Microsoft SQL Server Product Samples: Database](https://github.com/Microsoft/sql-server-samples/releases) on GitHub. Make sure that you install the correct version of the sample database for the version of SQL Server that you are running. - - A data-driven Web site. This enables you to create a data context for the database and the class that contains the data field to customize. For more information, see `Walkthrough: Creating a New Dynamic Data Web Site using Scaffolding`. ]]> diff --git a/xml/System.Web.DynamicData/DynamicControl.xml b/xml/System.Web.DynamicData/DynamicControl.xml index 152c3f0f90f..20f9da5e91c 100644 --- a/xml/System.Web.DynamicData/DynamicControl.xml +++ b/xml/System.Web.DynamicData/DynamicControl.xml @@ -102,10 +102,7 @@ ``` - - ## Examples - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.DynamicControl). The following example demonstrates how to use the control in a control to display, insert, delete and edit values from a database table. It is important to notice that in order to make the insert operation to work, the property of the `rowguid` and `ModifiedDate` columns are set to `true`. @@ -844,10 +841,7 @@ The field template that you specify using the property is specific to this instance of the control. You can also change the field template used by a data field across the entire application by applying the to your data model. Setting the property overrides the metadata applied to the data model. For more information about metadata attributes, see [ASP.NET Dynamic Data](https://msdn.microsoft.com/library/78c7fcd7-5f38-46a0-a4bc-48eff3c8a512). - - ## Examples - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.DynamicControl.UIHint). The following example shows how you can specify a data field to use a different field template to render its contents. The second example shows the custom field template specified by the property. diff --git a/xml/System.Web.DynamicData/DynamicField.xml b/xml/System.Web.DynamicData/DynamicField.xml index ce36c47d2b6..d8ed588482a 100644 --- a/xml/System.Web.DynamicData/DynamicField.xml +++ b/xml/System.Web.DynamicData/DynamicField.xml @@ -158,10 +158,7 @@ ``` - - ## Examples - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.DynamicField). The following example demonstrates how to use the object in a control to display and edit values from a database table. diff --git a/xml/System.Web.DynamicData/DynamicQueryStringParameter.xml b/xml/System.Web.DynamicData/DynamicQueryStringParameter.xml index 83cd0f3a92d..4abbee41253 100644 --- a/xml/System.Web.DynamicData/DynamicQueryStringParameter.xml +++ b/xml/System.Web.DynamicData/DynamicQueryStringParameter.xml @@ -30,10 +30,6 @@ In order to use the class, you must add a control to the page and you must register the data-bound control with the control by using the method. - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.DynamicQueryStringParameter). - - - ## Examples The following example shows how to use the object as filter when displaying data in a control. The control contains a object that creates a link that sets the query string value by using the foreign key value. diff --git a/xml/System.Web.DynamicData/MetaModel.xml b/xml/System.Web.DynamicData/MetaModel.xml index 324d119fc43..8bd6b25f2ac 100644 --- a/xml/System.Web.DynamicData/MetaModel.xml +++ b/xml/System.Web.DynamicData/MetaModel.xml @@ -26,15 +26,11 @@ In Visual Studio, you can generate data-model types by using the **LINQ to SQL Classes** template or the **ADO.NET Entity Data Model** template. These templates use the Object Relational Designer (O/R Designer) for the LINQ to SQL model, or the ADO.NET Entity Data Model Designer (Entity Designer) for the Entity Framework model. - - ## Examples The following example shows how to use type to perform the following tasks in order to use automatic scaffolding in an ASP.NET Web site: - Get the data model for the default data context. - - Get the data model for a specified data context. - - Evaluate the routing path (determine the URL) for a specified table. The example consists of a page and its code-behind file. @@ -50,11 +46,8 @@ To compile the example, you need the following: - Visual Studio 2010 or Visual Web Developer 2010 Express. - - A Dynamic Data Web site. For more information, see [Walkthrough: Creating a New Dynamic Data Web Site Using Scaffolding](https://msdn.microsoft.com/library/1564aef2-9103-436a-9806-c8ad7abd616a). - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel). - ]]> Can be thrown by any method if there has been a data context registration error. @@ -362,10 +355,6 @@ ## Remarks The route is determined by the combination of the table name and action. - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=PathModel.aspx) an online example of this feature. - - - ## Examples The following example shows how to use the method to evaluate the routing path (determine the URL) for a specified table. For a complete example, see . @@ -432,15 +421,10 @@ ## Remarks The object that is returned by the overloaded methods contains the metadata information that is associated with the specified table. - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=GetTable.aspx) an online example of this feature. - - - ## Examples The following example shows how to use the overloaded methods to perform the following tasks: - Get the object for the specified table. - - Access the metadata information that is contained by the object. The example consists of a page and its code-behind file. @@ -485,8 +469,6 @@ ## Remarks The name uniquely identifies a table in the data model and is used to generate the related URL for routing. - - ## Examples The following example shows how to use the method to obtain the metadata for the specified table. For a complete example, see . @@ -866,15 +848,10 @@ ## Remarks The collection contains all the tables in the data model, which includes the tables that are not visible (are not part of Dynamic Data scaffolding). - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=TablesMenu.aspx) an online example of this feature. - - - ## Examples The following example shows how to use the and properties to perform the following tasks: - Get a collection of all the tables in a data model and show them in a `GridView` control. - - Get a collection of the visible tables in a data model and show them in a `GridView` control. The example consists of a page and its code-behind file.