You are right in thinking that the form uses AJAX (previously through the UpdatePanel , now through the RadAjaxPanel in DNN 6.x), and what prevents the download. In most scenarios, you simply switch to a regular callback by calling ScriptManager.RegisterPostBackControl , but in the case of settings, you donโt have a direct link to LinkButton that saves the settings.
You will probably need to add your own button to the upload form after the user has selected the file. DNN own UrlControl uses a system where there is a Download button next to the Browse button. DNN also has a newer DnnFilePicker control, which can also encapsulate what you want. You just need to add the @ Register directive to use them. For instance:
<%@ Reference tagPrefix="dnn" tagName="UrlControl" Src="~/controls/URLControl.ascx" %> <%@ Reference tagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %> <dnn:UrlControl runat="server" ID="FileUpload" ShowLog="false" ShowNewWindow="false" ShowTrack="false" ShowImages="false" ShowNone="false" ShowTabs="false" ShowUrls="false" ShowUsers="false" ShowFiles="false" ShowUpLoad="true" /> <dnn:DnnFilePicker runat="server" ID="FilePicker" FileFilter="jpg,png,gif" />
source share