Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2004
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cleaning Up Image Code.

    Currently I am doing clean up on my code and I would like to have my imageUrl's resort back to aliases in the web.config:

    For example:
    Code:
    <asp: Image ID="imgHeader" RunAt="server" ImageUrl="imgHeaderPath" />
    The imgHeader path would be assigned in the web.config.

    What would the structure for that be in the web.config?

  • #2
    New Coder
    Join Date
    Oct 2004
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Heh, my thoughts exactly

  • #3
    Regular Coder Nischumacher's Avatar
    Join Date
    Oct 2005
    Location
    Bombay, India
    Posts
    196
    Thanks
    0
    Thanked 2 Times in 2 Posts
    THiS WiLL Go iN YouR 'Web.config'...
    Code:
    <configuration>
        <appSettings>
    	<add key="imgHeaderPath" value="/foldername/imagename.jpg"></add>
        </appSettings>
    </configuration>
    aND You CaN CaLL iT LiKe...
    Code:
    <asp: Image ID="imgHeader" RunAt="server" ImageUrl='ConfigurationSettings.AppSettings("imgHeaderPath")' />
    - NS 666
    .net DEVILoper


  •  

    Posting Permissions

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