Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

clear Element for connectionStrings (ASP.NET Settings Schema)

Removes all references to inherited connection strings, allowing only the connection strings that are added by the current add element.

This element is new in the .NET Framework version 2.0.

configuration Element (General Settings Schema)
  connectionStrings Element (ASP.NET Settings Schema)
    clear Element for connectionStrings (ASP.NET Settings Schema)
<clear />

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

None.

Parent Elements

Element

Description

configuration

Specifies the required root element in every configuration file that is used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration settings in a configuration file and contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

connectionStrings

Specifies a collection of database connection strings, as name/value pairs, for ASP.NET applications and features.

The clear element removes all references to inherited connection strings from the collection that is stored in the connectionStrings element, allowing only the connection strings that are added by the current add element.

The connectionStrings element specifies a collection of database connection strings, as name/value pairs, for ASP.NET applications and features.

The following code example shows how to clear the inherited connection strings.

<configuration>
  <connectionStrings>
    <clear/>
  </connectionStrings>
</configuration>

Configuration section handler

ConnectionStringsSection

Configuration member

Clear()

Configurable locations

Machine.config

Root-level Web.config

Application-level Web.config

Virtual or physical directory–level Web.config

Requirements

Microsoft Internet Information Services (IIS) version 5.0, 5.1, or 6.0

The .NET Framework version 2.0

Microsoft Visual Studio 2003 or Visual Studio 2005

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.