CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: View file

  1. #1
    Join Date
    Jul 2003
    Location
    Jordan
    Posts
    36

    View file

    Hello every body

    How could i view a file from the server. I mean open it without download it.

    what ever your reply thx alot.

    Abudair..
    www

  2. #2
    Join Date
    Mar 2002
    Posts
    109
    You can not do such a thing, since the client will no longer be connected to the server after the html is rendered.

  3. #3
    Join Date
    Feb 2002
    Posts
    187

    Re: View file

    You can do this:
    http://support.microsoft.com/defaul...kb;en-us;303475

    NOTE: It affects all files with the extension that you want to open directly, from any server.
    Hope it will help you (if I try to help you)
    Thanks (if you try to help me),
    ruca

  4. #4
    Join Date
    Feb 2005
    Posts
    17

    Re: View file

    IT bacsically depends upon what file you would like to send to the browser.

    If its any office document, IE might open automatillay in the browser , and the

    Code:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;303475
    applies only in case if you require the IE to open file download dialog instead of showing the file in the same window.


    Assuming that the file that you want to open is within the same asp.net application
    you can use the following. where strFileURL is the file path of the file you want to display.
    Code:
    Response.WriteFile(Server.MapPath(strFileURL))
    Hope it worked.

    Thanks

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured