2010-08-02 9 views
0

我想要添加一個鏈接到DNN usercontrol,當用戶點擊它時,他們可以下載一個特定的PDF。在我的鏈接點擊事件的代碼是:不會從DNN下載PDF usercontrol

Response.ContentType = "Application/pdf"; 

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

    Response.BinaryWrite(Content); 

    Response.End(); 

當鏈接點擊儘管代碼貫穿,沒有明顯的異常,但永遠不會顯示該對話框。熟悉的代碼在我的非DNN應用程序中工作良好。

回答

0

是由於電網被激活造成的