views:

13

answers:

1

Hi, I'm trying to get add a link to a DNN usercontrol where when the user clicks it they can download a particular PDF. The code in my link click event is:

    Response.ContentType = "Application/pdf";

    Response.AppendHeader("Content-Disposition", string.Format("attachment; filename=\"" + "fileName" + "\""));

    Response.BinaryWrite(Content);

    Response.End();

When the link is click though the code runs through with no apparent exceptions but the dialog is never displayed. Similiar code to this has worked for me in non DNN applications and worked fine.

Any suggestions?

Thanks!

A: 

Was due to the Grid being ajaxified

Mr Cricket