Using Visual Basic Express

M

MC

Hi folks.

Having a slight problem with ConfigurationManager in Visual Basic Express
Edition 2005.

Its claiming the Name ConfigurationManager is not declared. It works fine in
Visual Web Express but not when trying to use my connectionstring in my
app.config file.

I am using the following line:
Dim con as
System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("connString").ToString))

The ConfigurationManager underlines in green and say's what i put above when
i roll over it.

Anyone seen this problem or know a workround so I can pull this string.

Cheers
 
S

Siva M

Add a project reference to System.Configuration.dll assembly and add
'Imports System.Configuration' in the source.

Hi folks.

Having a slight problem with ConfigurationManager in Visual Basic Express
Edition 2005.

Its claiming the Name ConfigurationManager is not declared. It works fine in
Visual Web Express but not when trying to use my connectionstring in my
app.config file.

I am using the following line:
Dim con as
System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("connString").ToString))

The ConfigurationManager underlines in green and say's what i put above when
i roll over it.

Anyone seen this problem or know a workround so I can pull this string.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top