Search This Blog

Saturday, September 21, 2013

Read Connection String From Web.Config VB.Net

VB.NET > Data > SqlConnection > ConnectionString
 
Dim con As SqlConnection
Dim conString As String = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ToString
con = New SqlConnection(conString)
con.Open()