locked
downloading an attachment RRS feed

  • Question

  • I am trying to download an attachement

    when i get to Response.ContentType I get the following error

    Error 1 'Response' is an ambiguous reference between downloadproj.CRMSdk.Discovery.Response' and downloadproj.CRMSdk.Response' 

    neither one is valid -- i have for references

    using

     

    downloadproj.CRMSdk.Discovery;

    using

     

    downloadproj.CRMSdk;

    using

     

    System.IO;

    how do i get around this?


    • Edited by T Bonz Thursday, January 7, 2010 8:23 PM
    Thursday, January 7, 2010 7:57 PM

Answers

  • nevermind -- been a long day

    using a windows form so i had to stream it
    • Marked as answer by T Bonz Thursday, January 7, 2010 8:43 PM
    Thursday, January 7, 2010 8:41 PM

All replies

  • Could you give your code?

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Thursday, January 7, 2010 7:59 PM
    Moderator
  • the response part is

    Response.ContentType =

    "application/octet-stream";

    Response.AppendHeader(

    "Content-Transfer-Encoding", "binary");

    Response.AppendHeader(

    "content-disposition", "attachment; filename=" + DocReturned.filename);

    Response.BinaryWrite(exampleByteArray1);

    Thursday, January 7, 2010 8:16 PM
  • Try something like:

    Arcadia_GetAccountsID.CRMSdk.Response.ContentType = "application/octet-stream";
    Arcadia_GetAccountsID.CRMSdk.Response.AppendHeader("Content-Transfer-Encoding", "binary");
    Arcadia_GetAccountsID.CRMSdk.Response.AppendHeader("content-disposition", "attachment; filename=" + DocReturned.filename);
    Arcadia_GetAccountsID.CRMSdk.Response.BinaryWrite(exampleByteArray1);


    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)
    Thursday, January 7, 2010 8:19 PM
    Moderator
  • nevermind -- been a long day

    using a windows form so i had to stream it
    • Marked as answer by T Bonz Thursday, January 7, 2010 8:43 PM
    Thursday, January 7, 2010 8:41 PM