This is a migrated thread and some comments may be shown as answers.

Response + webservice

2 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tomasz
Top achievements
Rank 1
Tomasz asked on 18 Oct 2010, 01:56 PM
Hi All !

  Im generating the pdf file in webservice , that is binded with my aplication. And the webservice method returns the file in memory stream.

My question is how to flush the document , eg. so im presing the button and can download the document. In aspx that was following code 

  Response.Clear();
        Response.ClearContent();
        Response.ClearHeaders();
        Response.ContentType = "application/pdf";
        Response.AppendHeader("Content-Disposition", "attachment;filename=zamowienie.pdf");
        Response.OutputStream.Write(ms.GetBuffer(), 0, ms.GetBuffer().Length);
        Response.OutputStream.Flush();
        Response.OutputStream.Close();
        Response.End();

but i don't know how to do code this in silverlight.

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 18 Oct 2010, 02:08 PM
Hello Tomasz,

 You can use WebClient to download a stream. 

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tomasz
Top achievements
Rank 1
answered on 18 Oct 2010, 02:16 PM
in this stream is pdf file , can you give me any sample or idea how to flush it without type the uri adress?. I have the file in stream and just want to simply flush it.
Tags
General Discussions
Asked by
Tomasz
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Tomasz
Top achievements
Rank 1
Share this question
or