Server.Transfer and image path

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Server.Transfer and image path

    I have a subdirectory with it's own images folder. All the image paths in
    the pages in the sub directory are "image/image.jpg" When I
    Response.Redirect to a page in the subdirectory the images are fine but when
    I use Server.Transfer all the links are broken. I'd prefer to use the
    relative paths. Is there a way around this in the Server.Transfer?

    Many thanks
    Kevin Vogler


    Kevin Vogler Guest

  2. Similar Questions and Discussions

    1. Error Server.Transfer / Server.Execute ()
      Hi! Any one has Idea, How to use Server.Transfer and Server.Execute, When I tried to use these methods I got an eror: Server object error 'ASP...
    2. Transfer image to flash from director?
      Does anyone has any idea about transfer a image of a member or sprite to flash which is embeded in director? I've tried a way: save the image to...
    3. Transfer image from director to flash?
      Does anyone has any idea about transfer a image of a member or sprite to flash which is embeded in director? I've tried a way: save the image to...
    4. Server.Execute and Server.Transfer not detecting session state
      I am setting a session variable, then doing a server.transfer in global.aspx and the page I am going to is saying that session state is not enable...
    5. Path problems on PC to mac transfer
      I've created a crossplatform project. I am using a MAC with Toast to burn my CDs. At this point in time I'm only interested in burning the PC side...
  3. #2

    Default Re: Server.Transfer and image path

    Not sure why that would be happening if the page you're transferring to has
    correct image paths, but the one thing I could suggest is using
    /dir/images/file.gif for your paths, like use a path that is absolute from
    the root of your site in all your pages.

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "Kevin Vogler" <kvogler@voglerandassociates.com> wrote in message
    news:uaPveIeWDHA.2476@tk2msftngp13.phx.gbl...
    > I have a subdirectory with it's own images folder. All the image paths in
    > the pages in the sub directory are "image/image.jpg" When I
    > Response.Redirect to a page in the subdirectory the images are fine but
    when
    > I use Server.Transfer all the links are broken. I'd prefer to use the
    > relative paths. Is there a way around this in the Server.Transfer?
    >
    > Many thanks
    > Kevin Vogler
    >
    >

    Ray at Guest

  4. #3

    Default Re: Server.Transfer and image path

    Thanks for the reply. The image path is valid from where the page is but
    not from where the Server.Transfer is initiated. I'm redirecting based on
    the URL.

    thanks
    Kevin Vogler
    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:%23%23vwIcfWDHA.2100@TK2MSFTNGP11.phx.gbl...
    > Not sure why that would be happening if the page you're transferring to
    has
    > correct image paths, but the one thing I could suggest is using
    > /dir/images/file.gif for your paths, like use a path that is absolute from
    > the root of your site in all your pages.
    >
    > Ray at home
    >
    > --
    > Will trade ASP help for SQL Server help
    >
    >
    > "Kevin Vogler" <kvogler@voglerandassociates.com> wrote in message
    > news:uaPveIeWDHA.2476@tk2msftngp13.phx.gbl...
    > > I have a subdirectory with it's own images folder. All the image paths
    in
    > > the pages in the sub directory are "image/image.jpg" When I
    > > Response.Redirect to a page in the subdirectory the images are fine but
    > when
    > > I use Server.Transfer all the links are broken. I'd prefer to use the
    > > relative paths. Is there a way around this in the Server.Transfer?
    > >
    > > Many thanks
    > > Kevin Vogler
    > >
    > >
    >
    >

    Kevin Vogler Guest

  5. #4

    Default Re: Server.Transfer and image path

    Right click on the image to get its path properties.
    Compare this with an image that shows vs an image that doesnt.
    What is the .transfer code used?


    "Kevin Vogler" <kvogler@voglerandassociates.com> wrote in message
    news:#v83qrfWDHA.1896@TK2MSFTNGP12.phx.gbl...
    > Thanks for the reply. The image path is valid from where the page is but
    > not from where the Server.Transfer is initiated. I'm redirecting based on
    > the URL.
    >
    > thanks
    > Kevin Vogler
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:%23%23vwIcfWDHA.2100@TK2MSFTNGP11.phx.gbl...
    > > Not sure why that would be happening if the page you're transferring to
    > has
    > > correct image paths, but the one thing I could suggest is using
    > > /dir/images/file.gif for your paths, like use a path that is absolute
    from
    > > the root of your site in all your pages.
    > >
    > > Ray at home
    > >
    > > --
    > > Will trade ASP help for SQL Server help
    > >
    > >
    > > "Kevin Vogler" <kvogler@voglerandassociates.com> wrote in message
    > > news:uaPveIeWDHA.2476@tk2msftngp13.phx.gbl...
    > > > I have a subdirectory with it's own images folder. All the image
    paths
    > in
    > > > the pages in the sub directory are "image/image.jpg" When I
    > > > Response.Redirect to a page in the subdirectory the images are fine
    but
    > > when
    > > > I use Server.Transfer all the links are broken. I'd prefer to use the
    > > > relative paths. Is there a way around this in the Server.Transfer?
    > > >
    > > > Many thanks
    > > > Kevin Vogler
    > > >
    > > >
    > >
    > >
    >
    >

    grw Guest

  6. #5

    Default Re: Server.Transfer and image path

    When I do a show source it's identical whether it's code ex A or B. The
    structure is at the root I have default.asp which has the code below. The
    only way I can get it to work is if I put the images folder at the root.
    Apparently, using Server.Transfer just loads the new page in the old page so
    the references are all relative to the page with the transfer code. I'm
    just looking if there's a way I can change the Server.Transfer so it will
    deal with this.

    sub directory domain1 has a images directory and a default.asp. The image
    code in each default is:
    <img src="images/Logo.jpg" width="178" height="60">

    Code Ex A
    Dim strServerName
    strServerName = Request.ServerVariables("SERVER_NAME")

    Select Case strServerName
    Case "www.domain1.com"
    Response.redirect("domain1/default.asp")
    Case "www.domain2.org"
    Response.redirect("domain2/default.asp")
    Case Else
    Response.Redirect("bad.asp")
    End Select

    Code Ex B
    Dim strServerName
    strServerName = Request.ServerVariables("SERVER_NAME")

    Select Case strServerName
    Case "www.domain1.com"
    Server.Transfer("domain1/default.asp")
    Case "www.domain2.org"
    Server.Transfer("domain2/default.asp")
    Case Else
    Response.Redirect("bad.asp")
    End Select

    Thanks
    Kevin Vogler


    Kevin Vogler Guest

  7. #6

    Default Re: Server.Transfer and image path

    Use <img src="/images/Logo.jpg" width="178" height="60">



    "Kevin Vogler" <kvogler@voglerandassociates.com> wrote in message
    news:ODNv10gWDHA.384@TK2MSFTNGP12.phx.gbl...
    > When I do a show source it's identical whether it's code ex A or B. The
    > structure is at the root I have default.asp which has the code below. The
    > only way I can get it to work is if I put the images folder at the root.
    > Apparently, using Server.Transfer just loads the new page in the old page
    so
    > the references are all relative to the page with the transfer code. I'm
    > just looking if there's a way I can change the Server.Transfer so it will
    > deal with this.
    >
    > sub directory domain1 has a images directory and a default.asp. The image
    > code in each default is:
    > <img src="images/Logo.jpg" width="178" height="60">
    >
    > Code Ex A
    > Dim strServerName
    > strServerName = Request.ServerVariables("SERVER_NAME")
    >
    > Select Case strServerName
    > Case "www.domain1.com"
    > Response.redirect("domain1/default.asp")
    > Case "www.domain2.org"
    > Response.redirect("domain2/default.asp")
    > Case Else
    > Response.Redirect("bad.asp")
    > End Select
    >
    > Code Ex B
    > Dim strServerName
    > strServerName = Request.ServerVariables("SERVER_NAME")
    >
    > Select Case strServerName
    > Case "www.domain1.com"
    > Server.Transfer("domain1/default.asp")
    > Case "www.domain2.org"
    > Server.Transfer("domain2/default.asp")
    > Case Else
    > Response.Redirect("bad.asp")
    > End Select
    >
    > Thanks
    > Kevin Vogler
    >
    >

    grw Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139