URL hardcoded

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Scotchy

    URL hardcoded

    Hi all, Im a newbie to ASP.NET [Oh no not another one :-) ]

    I have image buttons , logos etc on my APSX pages and the images are located
    at pecific URL on our Development server.

    Now when I get around to deploying this app to TEST and then to PROD I will
    need to change these URL's to point to the correct server address, whoa, too
    much work and bad programming practice of course.

    My question is , how can I make the URL's dynamic, ie: one URL fits all hosts?

    I see how to set the Connection string in webconfig, but how to do this in
    the image linksIm not sure.

    Any help greatly appreciated and thanks in advance.



  • Scotchy

    #2
    RE: URL hardcoded

    Ok, Found out how, but will post here anyway for others.

    Use "Document Relative" ../Projfolder/Images/Image.jpg

    That makes the image location dynamic

    "Scotchy" wrote:
    [color=blue]
    > Hi all, Im a newbie to ASP.NET [Oh no not another one :-) ]
    >
    > I have image buttons , logos etc on my APSX pages and the images are located
    > at pecific URL on our Development server.
    >
    > Now when I get around to deploying this app to TEST and then to PROD I will
    > need to change these URL's to point to the correct server address, whoa, too
    > much work and bad programming practice of course.
    >
    > My question is , how can I make the URL's dynamic, ie: one URL fits all hosts?
    >
    > I see how to set the Connection string in webconfig, but how to do this in
    > the image linksIm not sure.
    >
    > Any help greatly appreciated and thanks in advance.
    >
    >
    >[/color]

    Comment

    Working...