System.Web 2.0.0.0 System.Web.Compilation.ExpressionBuilder System.Web.Compilation.ExpressionPrefix("ConnectionStrings") System.Web.Compilation.ExpressionEditor("System.Web.UI.Design.ConnectionStringsExpressionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

The class provides access to values in the <connectionStrings> section of the Web.config file. The <connectionStrings> section of the Web.config file contains connection string values in name/value pairs.

A connection string value is retrieved by assigning an expression of the form

<%$ ConnectionStrings: secureConnectionString %>

to a control property. The part of the expression before the colon (:) designates the type of expression to be retrieved, and the part after the colon signifies the name of the connection string. The preceding expression would retrieve the following value from the Web.config file.

<connectionStrings>

<add name="secureConnectionString" connectionString="Data

Source=localhost;Integrated Security=SSPI;Initial

Catalog=Northwind;" providerName="System.Data.SqlClient" />

</connectionStrings>

When the page parser encounters an expression with the prefix ConnectionStrings, it creates an instance of the class to handle the expression.

If the expression is encountered in a page that will be compiled, the object generates code that retrieves the specified connection string from the Web.config file. If the expression is encountered in a page that will not be compiled, the object returns the value from the Web.config file when the page is parsed.

Retrieves, or generates code to retrieve, values from the <connectionStrings> section of the Web.config file.

- Constructor
  To be added.

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Object `` `` `` ``

  This method is called when an expression of the form <%$ ConnectionStrings: secureConnectionString %> is encountered in a page that is not compiled. It retrieves the appropriate value from the <connectionStrings> section of the Web.config file. This method overrides the method by calling the method if a connection string is included in the parameter, or by calling the method if a connection string is not included in the parameter.

  Returns a value from the <connectionStrings> section of the Web.config file.

  The associated with a key in the <connectionStrings> section of the Web.config file.

  The object that contains the expression. The property to which the expression is bound. The object that represents parsed data as returned by . Properties for the control or page. 2.0.0.0
- Method
  System.CodeDom.CodeExpression `` `` ``

  This method is called during the CodeDOM creation for a page or control. The object returned is of the type and represents the method to call when retrieving a connection string value.

  Returns a code expression to evaluate during page parsing.

  A that invokes a method.

  An object that represents information about the property bound to by the expression. The object that represents parsed data as returned by . Properties for the control or page. 2.0.0.0
- Method
  System.String ``

  The property returns a collection of connection string values. The method returns the value from this collection that is associated with the connection string name.

  Returns a connection string from the <connectionStrings> section of the Web.config file.

  The connection string as a for this connection string name.

  The name of the connection string. 2.0.0.0
- Method
  System.String ``

  The property returns a collection of connection string values. The method returns the provider for the value from this collection that is associated with the connection string name.

  Returns the connection string provider from the <connectionStrings> section of the Web.config file.

  The provider as a for this connection string name.

  The name of the connection string. 2.0.0.0
- Method
  System.Object `` `` ``

  The returned is of the type . This object can be passed to both the method and the method as . The object contains the name and value of the connection string.

  Returns an object that represents the parsed expression.

  An containing the parsed representation of the expression.

  The value of the declarative expression. The targeted type for the expression. Properties for the control or page. 2.0.0.0
- Property
  System.Boolean To be added.

  The property indicates whether the method has been implemented in the class. must be implemented within an expression builder for an expression to be evaluated in a page that is not compiled. supports no-compile evaluation of connection strings, so true is always returned.

  Returns a value indicating whether an expression can be evaluated in a page that is not compiled.

  2.0.0.0