ConnectionString Property

EntityDataSource.ConnectionString Property

.NET Framework (current version)
 

Gets or sets the connection string that is used to execute the query.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Entity (in System.Web.Entity.dll)

public string ConnectionString { get; set; }

Property Value

Type: System.String

The connection string for the query.

The ConnectionString property of the EntityDataSource control can be initialized from a named EDM connection string stored in the element of the application configuration file. When the EDM is created by using the Entity Data Model Wizard, a named EDM connection is created in the application configuration file. When a named EDM connection string is found in the application configuration file, the connection is visible as an option in the Configure Data Source wizard of the EntityDataSource designer. For more information, see Configure Data Source Wizard (EntityDataSource Control).

If the ContextTypeName property is not specified, both the DefaultContainerName and ConnectionString properties must be set for the control to create the ObjectContext.

.NET Framework
Available since 3.5
Return to top
Show:
© 2016 Microsoft