ConnectionString property not initialized problem

I am running an page and trying to connection to a database using a connection string on the web.config file. This generates the following error message:

System.InvalidOperationException: The ConnectionString property has not been initialized.

when i embed the connection string on the application, it works ok but when I add the connection string to the web config file it throws the above error message

Below is a copy of the web config file and also the application where I am trying to use it.

----------------------------ASP.NET PAGE-------------------

Dim strInsert As String
Dim cmdInsert As SqlCommand
Dim strConnection As String
Dim sqlConn As SqlConnection

strConnection = ConfigurationSettings.AppSettings(“connection”)
sqlConn = New SqlConnection (strConnection)
---------------------------Web.Config Page-----------------------

<compilation debug=“true”/>
<add name=“connection”
connectionString=“Server=ip addressused;Database=dbnameused;User Id=usernameused; password=passwordused”
providerName=“System.Data.SqlClient” />

I tried using coonectionstrings instead of appsettings tag but it didnt work either

Any ideas

Thanks in advance

It will definitely be the ConnectionStrings method you need to use.

There should be a connectionString method you can use, or .ToString() it.

eg. ConfigurationSettings.ConnectionStrings(“connection”).connectionString;

I tried connection string you suggested but it generates a conversion error (cannt convert to string)