Sunday, 6 December 2015

Download feature not working within update-panel in asp-net






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);

No comments:

Post a Comment