href link to code creation of file and open of that file

Discussion in 'ASP .Net' started by Ryan, Nov 5, 2004.

  1. Ryan

    Ryan Guest

    can i create a link that doesnt open a browser window... a link that
    executes the aspx.vb code first (code that creates a file) and
    transfers to an opening of a dynamically created (vcs outlook) file...

    so what the user gets returned from a click of a link is the opening
    of the file dialog message.

    make any sense?

    Any help?
    Ryan, Nov 5, 2004
    #1
    1. Advertising

  2. Ryan

    Scott Allen Guest

    What you could do is write the vcs directly from code behind without
    saving it to disk.

    The code would look a lot like the code in this KB article:

    How To Write Binary Files to the Browser Using ASP.NET and Visual
    Basic .NET
    http://support.microsoft.com/kb/307603/EN-US/

    Except instead of writing into the response stream a file from disk,
    you could just write into the response stream the content of the file
    you would have created. The best part is there are no little vcs files
    to clean off the server.

    You might need to add a disposition header too, ie:

    Response.AppendHeader("Content-Disposition", "attachment;
    filename=afilename.vcs")

    HTH,
    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On 5 Nov 2004 11:52:15 -0800, (Ryan) wrote:

    >can i create a link that doesnt open a browser window... a link that
    >executes the aspx.vb code first (code that creates a file) and
    >transfers to an opening of a dynamically created (vcs outlook) file...
    >
    >so what the user gets returned from a click of a link is the opening
    >of the file dialog message.
    >
    >make any sense?
    >
    >Any help?
    Scott Allen, Nov 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    200,649
    Adrienne Boswell
    Jun 20, 2006
  2. Soren Vejrum
    Replies:
    4
    Views:
    567
    Lasse Reichstein Nielsen
    Jul 5, 2003
  3. saiho.yuen
    Replies:
    3
    Views:
    416
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    457
  5. Vincent van Beveren

    BASE HREF and A HREF="#" onclick="..."

    Vincent van Beveren, Jul 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    310
    Vincent van Beveren
    Jul 6, 2006
Loading...

Share This Page