ConfigurationSettings problem?

Discussion in 'ASP .Net' started by Bruce W.1, Jan 7, 2005.

  1. Bruce W.1

    Bruce W.1 Guest

    I started a new web app.. In my Page_Load method I do this:

    string strConnTxt = ConfigurationSettings.AppSettings["ConnectString"];

    and the compiler gives this error:

    The type or namespace name 'ConfigurationSettings' could not be found
    (are you missing a using directive or an assembly reference?)

    This is a very basic thing but I can't figure out why it is happening.
    Does anyone know?

    Thanks for your help.
     
    Bruce W.1, Jan 7, 2005
    #1
    1. Advertising

  2. Bruce W.1

    Karl Seguin Guest

    add using System.Configuration atop your file

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Bruce W.1" <> wrote in message
    news:Ox3$...
    > I started a new web app.. In my Page_Load method I do this:
    >
    > string strConnTxt = ConfigurationSettings.AppSettings["ConnectString"];
    >
    > and the compiler gives this error:
    >
    > The type or namespace name 'ConfigurationSettings' could not be found
    > (are you missing a using directive or an assembly reference?)
    >
    > This is a very basic thing but I can't figure out why it is happening.
    > Does anyone know?
    >
    > Thanks for your help.
     
    Karl Seguin, Jan 7, 2005
    #2
    1. Advertising

  3. Bruce W.1

    Bruce W.1 Guest

    Karl Seguin wrote:
    > add using System.Configuration atop your file
    >
    > Karl
    >

    ==========================================
    That worked. Thanks.
     
    Bruce W.1, Jan 7, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bassel Tabbara [MSFT]

    RE: ConfigurationSettings.AppSettings Error

    Bassel Tabbara [MSFT], Jul 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    714
    Bassel Tabbara [MSFT]
    Jul 7, 2003
  2. Rob Mayo
    Replies:
    6
    Views:
    473
    TJoker .NET [MVP]
    Sep 22, 2003
  3. Guest
    Replies:
    3
    Views:
    3,746
    =?Utf-8?B?TG9yaSBNY0RvbmFsZA==?=
    Feb 23, 2004
  4. [myfirstname]

    ConfigurationSettings vs Application State

    [myfirstname], Feb 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    670
    Teemu Keiski
    Feb 19, 2004
  5. =?Utf-8?B?Sk1E?=
    Replies:
    4
    Views:
    2,443
    Scott Allen
    Jun 30, 2004
Loading...

Share This Page