Hi, I found the problem. The code works, the problem is in the UpdatePanel,
the link must be outside the UpdatePanel to work, another problem is that I
work with UpdatePanel in masterpage, that is my contentspages are inside the
UpdatePanel, does anyone have a solution that can work within the
UpdatePanel?
Regards

2010/5/4 Peter Groenewegen <[email protected]>

> Have you put a breakpoint in the method to verify that the code runs?
>
> On Mon, May 3, 2010 at 11:23 PM, Alex Vidotto <[email protected]>
> wrote:
> > Alright guys?
> >
> > I have a problem ..
> > I want to provide a link to download the file on the site.
> > Look at the method:
> >
> >  private void startDownload(string URL)
> >         {
> >
> >             string path = MapPath(URL);
> >             string name = Path.GetFileName(path);
> >             string ext = Path.GetExtension(path);
> >
> >             Response.ContentType = "Application/pdf";
> >             Response.AppendHeader("content-disposition",
> >                 "attachment; filename=" + name);
> >             Response.WriteFile(path);
> >             Response.End();
> >
> >         }
> >
> >
> > The download does not start, can someone help me?
> >
> > tks
> > Alex Vidotto
> >
> >
>



-- 
Att.
Alex Vidotto

Reply via email to