Download feature not working within update panel in asp.net

后端 未结 7 1717
孤城傲影
孤城傲影 2020-11-29 06:13

I have a Web User Control containing a FormView. The formview shows details of job seeker. I have provided a button for \"Download Resume\" link, so that admin/

7条回答
  •  醉话见心
    2020-11-29 07:05

    You cannot return an attachment in an UpdatePanel partial postback, since the results are used by the ScriptManager to update a DIV (not the whole response). The simplest fix for what you're trying to do would be to make your download button as a postback control. That would cause that button to initiate a full postback. Here's the code below to include in your Page_Load

    ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(this.lnkDownload);
    

提交回复
热议问题