New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedProblems with the asyncupload control.Problems with the asyncupload control.
New Post
3/26/2014 2:44 PM
I am trying to use the asyncupload control.

The control sort of works but there are a couple of issues:

1) The control causes other user controls on the page to reload.

2) The post back only works the first time.

I've put the relevant cut down code snippets below.

edit.ascx contains two controls which I've named JRACControl and MainFormUserControl. MainFormUserControl contains other user controls (not shown).

JRACControl  contains the asyncupload wrapped in an ajaxpanel.

When a file is selected in the  JRACControl it causes the MainFormUserControl to reload which causes all it's controls reload as well.

Here are my questions:

1) How can I make the asyncupload control upload a file without affecting the other controls on the page.

2) How can I make the 'upload' button continue to work after the first upload.

I would be grateful for any hints on what else to try.





<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditActual.ascx.cs"

Inherits="MycompanyName.Modules.FlexiContent.Edit" %>

<%@ Register Src="~/desktopmodules/FlexiContent/UserControls/MainFormUserControl.ascx" TagPrefix="dnn"

TagName="MainFormUserControl" %>

<%@ Register Src="~/desktopmodules/FlexiContent/UserControls/JRACControl.ascx" TagPrefix="dnn" TagName="JRACControl" %>

<%@ Register Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" TagPrefix="cc1" %>

<dnn:JRACControl   runat="server" id="JRACControl" />

<asp:Panel ID="Panel1" Height="450" style="margin-left:14px" runat="server"  ScrollBars="Both" Width="100%">

        <dnn:MainFormUserControl  runat="server" id="MainFormUserControl" ClientIDMode="Static"/>


C# code behind - works fine!


        protected void myuploadcontrol_FileUploaded(object sender, FileUploadedEventArgs e)


            foreach (UploadedFile f in myuploadcontrol.UploadedFiles)


//Code to save the file using the parameter supplied.








    <cc1:DnnAjaxPanel id="ImageDnnAjaxPanel" runat="server">

                    <cc1:DnnAsyncUpload AllowedFileExtensions="jpeg,jpg,gif,png"







                    <asp:Button class="UploadImage" ID="Upload" runat="server" Text="Upload" />       


JAVASCRIPT - called when a file is selected. just adds a parameter to include with the post back


        function OnClientFileUploaded(radAsyncUpload, args) {

            var $row = $(args.get_row());

            var inputName = radAsyncUpload.getAdditionalFieldID("ContentItemID");

            var inputType = "text";

            var inputID = inputName;

            var input = createInput(inputType, inputID, inputName);

            var label = createLabel(inputID);






        function createInput(inputType, inputID, inputName) {

            var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" value="' + "20" +

'" />';

            return input;


        function createLabel(forArrt) {

            var label = '<label for=' + forArrt + '>File info: </label>';

            return label;

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedProblems with the asyncupload control.Problems with the asyncupload control.

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out