Opening the files in an modless window.

Last post 07-06-2007 1:48 AM by Veera Venkata. 2 replies.

Sort Posts:

  • Opening the files in an modless window.

    07-05-2007, 2:46 AM

    Hi All,

    I am uploading a file with extension (.xls/.doc/.pdf) in my aspx page with in my application.

    i have one option for downloading the file with download button.when i click the button it opens with a modless window with options(open,save, cancel).

    i have another option for viewing the file with hypelink.when i click the hyperlink it opens with a modless window with options(save, cancel).The file type is shown as unknown file. The required one is  the modless window has to get with options(open,save,cancel)

    let me know.

    thanks. 

     

     

     

     

     

    Filed under:
  • Re: Opening the files in an modless window.

    07-05-2007, 3:33 PM
    • All-Star
      45,563 point All-Star
    • haidar_bilal
    • Member since 07-14-2003, 1:43 AM
    • Lebanon - Beirut
    • Posts 8,726

    Have a look at the following articles, especially the 3rd link:

    1- Downloading Files in ASP.NET

    2- Build Smarter ASP.NET File Downloading Into Your Web Applications

    3- Downloading a File with a Save As Dialog in ASP.NET

    Hope this helps,
    Regards

    Bilal Hadiar, MCP, MCTS, MCPD, MCT
    Microsoft MVP - Telerik MVP
  • Re: Opening the files in an modless window.

    07-06-2007, 1:48 AM

    hi all,

    some of u had given some links for my post. thanks for that.

    but we r using asp.net1.1, we r  using the present code.

    the file types  are (.xls/doc/txt)

    Response.ContentType = "application/" & FileExt

    Response.ContentType = "application/octet-stream"

    Response.AddHeader("content-disposition", "attachment; filename=" & FileNameOnly)

    Response.WriteFile(iFileNname, False)

    Response.End()

    for this code, i am not able to get the open option.

    thanks,

     

     

     

    Filed under: ,
Page 1 of 1 (3 items)