AppSettings Problem

Results 1 to 3 of 3

Thread: AppSettings Problem

  1. #1
    Join Date
    Dec 1969

    Default AppSettings Problem

    I am a newbie to dotne, I&#039;m currently trying to create a wrapper class for my database interaction.<BR><BR>I am having problems retrieving an AppSetting from the web.config file.<BR><BR>i have a label on the page and have set the text property as follows<BR><BR>Label1.Text = ConfigurationSettings.AppSettings("connString")<BR ><BR>and have set up the AppSettings in the web.config file as follows<BR><BR>&#060;appSettings&#062;<BR> &#060;add key="connString" value="connection details"<BR>&#060;/appSettings&#062;<BR><BR>however when i try to view the page in the browser i get the following error.<BR><BR>&#039;System.NullRefernceException object not set to an instance of an object&#039;<BR><BR>not sure why though

  2. #2
    Join Date
    Dec 1969

    Default RE: AppSettings Problem

    You must have an asp label in that page called Label1.Text or I think you will get that error. ALso do You have custom errors on if not it may be a good idea.

  3. #3

    Default Microsoft Application Blocks for .NET

    Before embarking on creating a generic dal, have a look at this.<BR><BR><BR><BR>and this<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts