Results 1 to 2 of 2

Thread: add appsetting element in code

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    add appsetting element in code

    Hi All,

    To keep it short and sweet I need to be able to add this element to the <Appsetting> section of my config file in code :
    Code:
    <add key="WebService_CustomerLog"
          value="http://www.mysite/CustomerLog.asmx" />
    Any Ideas ?


    Thanks In Advance

    Parksie

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: add appsetting element in code

    If you follow the Protected Configuration link in my signature you'll see how to open, edit and save the config file. One of the examples I use is for the appSettings section. It doesn't specifically show you how to add a new entry and I've never actually tried, but once you know how to edit an existing entry it shouldn't be too hard to work out with a little bit of reading.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width