Results 1 to 12 of 12

Thread: setting content disposition

Threaded View

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    setting content disposition

    I have set up a page with a link to a file to download, that will prompt user to open, save or cancel rather than open the xls in browser like this:

    VB Code:
    1. Dim VirtualPath As String = Request.ServerVariables("SERVER_NAME").ToString
    2. Dim file As String = Request.QueryString("href")
    3. Dim filepath As String = "http://" & VirtualPath & file
    4. Dim filename As String = System.IO.Path.GetFileName(filepath)
    5. Response.ContentType = "application/x-msdownload"
    6.  
    7. lblHref.Text = ("<a href=" & filename & ">download</a>")

    is there a way to open the save as box straight away without clicking save?
    Last edited by davebat; Oct 17th, 2006 at 07:33 AM.

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