How to Open connection where connection string exist in the web config file

Write the following code to open sqlconnection

Dim SqlConn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ToString())
SqlConn.Open()