The first should work but may be a refresh issue.  The second one most
likely should not work since it resolves to a physical path on the
server but will work if you are using your local machine as the server
right now.

I would suggest the Response.BinaryWrite() and write out the bytes of
the file though an aspx page.  You will need to set the ContentType and
the Content-Disposition header (it's good to set the extension header
also) and make sure your aspx page is blank or contains only code if
you're not using a code behind.  Of course you will get slightly
different behaviors in different browsers.

Chad
> -----Original Message-----
> From: Farhan Shah [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 9:04 AM
> To:   [EMAIL PROTECTED]
> Subject:      [ADVANCED-DOTNET] Response.Redirect issue
> 
> I am not sure what i am doing wrong, but this is kinda freaky issue:
> 
> I am trying to open a PDF file in virtual folder using following:
>      Response.Redirect("/carespring/Output/NEW.PDF")
> 
> I get a blank page and when i click on refresh, it opens the file.
> 
> But i do following, it opens the file from Server Path.
> 
> Response.Redirect(Server.MapPath("/carespring/OutPut/NEW.PDF"))
> 
> Any idea why is this happening?
> 
> Thanks,
> Farhan
> 
> You can read messages from the Advanced DOTNET archive, unsubscribe
> from Advanced DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to