How to download memoryStream file
<p>i'm Beginner in asp.net, i create pdf file with <a href="http://pdfreport.codeplex.com/SourceControl/BrowseLatest" rel="nofollow">PdfRpt</a>. i write this code in class</p>

<pre><code>namespace PdfReportSamples.CustomPriceNumber
{
    public class CustomPriceNumberPdfReport
    {
        public IPdfReportData CreatePdfReport()
        {
            using (var memoryStream = new MemoryStream())
            {
                var ii= new PdfReport().DocumentPreferences(doc =&gt;
                {
                    doc.RunDirection(PdfRunDirection.LeftToRight);
                    doc.Orientation(PageOrientation.Portrait);
                    doc.PageSize(PdfPageSize.A4);
                    doc.DocumentMetadata(new DocumentMetadata { Author = "Vahid", Application = "PdfRpt", Keywords = "Test", Subject = "Test Rpt", Title = "Test" });
                })
           .DefaultFonts(fonts =&gt;
           {
               fonts.Path(Environment.GetEnvironmentVariable("SystemRoot") + "\\fonts\\arial.ttf",
                                 Environment.GetEnvironmentVariable("SystemRoot") + "\\fonts\\verdana.ttf");
           })
           .PagesFooter(footer =&gt;
           {
               footer.DefaultFooter(DateTime.Now.ToString("MM/dd/yyyy"));
           })
           .PagesHeader(header =&gt;
           {
               header.DefaultHeader(defaultHeader =&gt;
               {
                   defaultHeader.RunDirection(PdfRunDirection.LeftToRight);

               });
           })
           .MainTableTemplate(template =&gt;
           {
               template.BasicTemplate(BasicTemplate.SilverTemplate);
           })
           .MainTablePreferences(table =&gt;
           {
               table.ColumnsWidthsType(TableColumnWidthType.Relative);
           })
           .MainTableDataSource(dataSource =&gt;
           {
               var listOfRows = new List&lt;Transaction&gt;();
               for (int i = 0; i &lt; 200; i++)
               {
                   listOfRows.Add(new Transaction
                   {
                       Product = "Item " + i,
                       Description = "Desc. " + i,
                       SalePrice = 1000 * i
                   });
               }
               dataSource.StronglyTypedList(listOfRows);
           })

           .MainTableColumns(columns =&gt;
           {
               columns.AddColumn(column =&gt;
               {
                   column.PropertyName("rowNo");
                   column.IsRowNumber(true);
                   column.CellsHorizontalAlignment(HorizontalAlignment.Center);
                   column.IsVisible(true);
                   column.Order(0);
                   column.Width(1);
                   column.HeaderCell("#");
               });

               columns.AddColumn(column =&gt;
               {
                   column.PropertyName&lt;Transaction&gt;(x =&gt; x.Product);
                   column.CellsHorizontalAlignment(HorizontalAlignment.Center);
                   column.IsVisible(true);
                   column.Order(1);
                   column.Width(2);
                   column.HeaderCell("Product");
               });

               columns.AddColumn(column =&gt;
               {
                   column.PropertyName&lt;Transaction&gt;(x =&gt; x.Description);
                   column.CellsHorizontalAlignment(HorizontalAlignment.Center);
                   column.IsVisible(true);
                   column.Order(2);
                   column.Width(3);
                   column.HeaderCell("Description");
               });

               columns.AddColumn(column =&gt;
               {
                   column.PropertyName&lt;Transaction&gt;(x =&gt; x.SalePrice);
                   column.CellsHorizontalAlignment(HorizontalAlignment.Center);
                   column.IsVisible(true);
                   column.Order(3);
                   column.Width(3);
                   column.HeaderCell("Sale Price");
                   column.ColumnItemsTemplate(template =&gt;
                   {
                       template.CustomTemplate(new CustomPriceCell());
                   });
                   column.AggregateFunction(aggregateFunction =&gt;
                   {
                       aggregateFunction.NumericAggregateFunction(AggregateFunction.Sum);
                       aggregateFunction.DisplayFormatFormula(obj =&gt; obj == null ? string.Empty : string.Format("{0:n0}", obj));
                   });
               });

           })
           .MainTableEvents(events =&gt;
           {
               events.DataSourceIsEmpty(message: "There is no data available to display.");
           })
           .Export(export =&gt;
           {
               export.ToExcel();
           })
           .Generate(data =&gt; data.AsPdfStream(memoryStream));


       }


        }
    }
}
</code></pre>

<p>i Want when user click in button send this file (into memoryStream ) for download. but i don't know how to write this code. please help me. thanks expert</p>
