ConfigurationSettings can't be seen from a code behind class?

  • Thread starter Thread starter Andrew Fisher
  • Start date Start date
A

Andrew Fisher

Hi all,

I have set up some config options in the web.config file and have
successfully used them in my test pages. When I came to abstract my
code from the design - by using code behind files, all of a sudden I am
told I can't use the ConfigurationSettings object because it isn't
referenced as a namespace.

I understand what the compiler is telling me is the problem but I'm not
sure what namespaces I need to include to make this work?
Any help or suggestions would be greatly appreciated.

Cheers
AndrewF
 
Yoiu need to import the
System.Configuration.ConfigurationSettings class.

Add

Imports System.Configuration.ConfigurationSettings

at the top of your codebehind file.



Juan T. Llibre
ASP.NET MVP
===========
 
Hi Juan and Steve,

Works perfectly - thanks loads for that. I hoped it would be something
simple like that

Cheers
AndrewF
 

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

Back
Top