How to get the location tag value from web.config

Discussion in 'ASP .Net' started by Bob, Jul 13, 2005.

  1. Bob

    Bob Guest

    I have several location sections defined in my web.config file. Below is
    the sample of one section:

    .....................
    <location path="US">
    <appSettings>
    <add key="fileLocation" value="e:\temp\" />
    ................
    </appSettings>
    </location>
    ......................

    In my web services code (asmx.cs file), I need to get the path value (in
    this case "US"). I can't seem to find a way to retrieve this. Could anyone
    help?

    THanks a lot, Bob
     
    Bob, Jul 13, 2005
    #1
    1. Advertising

  2. Check out: http://msdn.microsoft.com/msdnmag/issues/04/09/ASPColumn/

    "Bob" wrote:

    > I have several location sections defined in my web.config file. Below is
    > the sample of one section:
    >
    > .....................
    > <location path="US">
    > <appSettings>
    > <add key="fileLocation" value="e:\temp\" />
    > ................
    > </appSettings>
    > </location>
    > ......................
    >
    > In my web services code (asmx.cs file), I need to get the path value (in
    > this case "US"). I can't seem to find a way to retrieve this. Could anyone
    > help?
    >
    > THanks a lot, Bob
    >
    >
    >
     
    =?Utf-8?B?SmFzb24gTCBMaW5k?=, Jul 13, 2005
    #2
    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. shruds
    Replies:
    1
    Views:
    872
    John C. Bollinger
    Jan 27, 2006
  2. GD
    Replies:
    4
    Views:
    445
    darrel
    Aug 18, 2006
  3. CSharpner
    Replies:
    0
    Views:
    1,093
    CSharpner
    Apr 9, 2007
  4. AMP
    Replies:
    1
    Views:
    444
    Alexey Smirnov
    Feb 14, 2010
  5. Pete
    Replies:
    1
    Views:
    237
    Dominick Baier [DevelopMentor]
    Jun 1, 2005
Loading...

Share This Page