ConnectionStringsExpressionBuilder.GetConnectionString(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a connection string from the <connectionStrings
> section of the Web.config file.
public:
static System::String ^ GetConnectionString(System::String ^ connectionStringName);
public static string GetConnectionString (string connectionStringName);
static member GetConnectionString : string -> string
Public Shared Function GetConnectionString (connectionStringName As String) As String
Parameters
- connectionStringName
- String
The name of the connection string.
Returns
The connection string as a String for this connection string name.
Exceptions
The connection string name could not be found in the Web.config file.
Remarks
The ConnectionStrings property returns a collection of connection string values. The GetConnectionString method returns the value from this collection that is associated with the connection string name.
Applies to
See also
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre