starting uploads causes Postbacks in DotNetNuke?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

starting uploads causes Postbacks in DotNetNuke?

Guest-1107

Hi!

First of all, let me thank you for this great project. It looks very promising and I'm sure it takes much of your freetime ;-)

I have a little problem using the control in a self-made DotNetNuke module (.ascx-file). I've written a few lines of test code containing only a MultiFile (with using Flash if available) and ProgressBar element but everytime I start the upload process, the progress window opens but the main page refreshes (maybe because of an unwanted postback) and the upload process stalls after the first file has been transmitted.

I'm quite sure it has something to do with DotNetNuke's framework "around" my ascx-file but I just can't figure out where to fix this problem. My setup seems to be fine because I can easily use the NeatUpload components inside a (stand-alone) aspx file within the DotNetNuke project.

As the DotNetNuke framework already builds a form-tag around my module I'm not allowed to use a form inside my ascx-file and I guess that may cause the problem...

Do you have any idea?

Thanks...

chris

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: starting uploads causes Postbacks in DotNetNuke?

Dean Brettle
Administrator
Sounds like the known issue where clicking submit buttons or image buttons might start the progress display or clear selected files.  Do the workarounds described there help?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: starting uploads causes Postbacks in DotNetNuke?

Guest-1107

Hi Dean,

thanks for your quick reply. Unfortunately, changing the UseSubmitBehaviour attribute didn't do the trick. However, I've noticed that changing this attribute causes the page to not do a complete postback anymore ... but now, the progressbar window doesn't open at all.

I've noticed another interesting behaviour: Regardless of the UseSubmitBehaviour attribute, the MultiFile control seems to fall back to the "non-flash" layout everytime I start the upload process. I mean, by default the control only renders the "Pick files..." button as it should but as soon as I start the upload it reverts to a regular "file input" tag.

Here's my code:

<Upload:MultiFile ID="MultiFile1" runat="server" UseFlashIfAvailable="True">
</Upload:MultiFile>
<Upload:ProgressBar ID="ProgressBar1" runat="server" Triggers="cmdStartUpload" />
<asp:Button ID="cmdStartUpload" runat="server" onclick="Button1_Click"
    Text="Button" UseSubmitBehavior="False" />

Do you have any other ideas?

Just as a side note: Removing the ProgressBar element won't work either. Then the upload wouldn't even start and the MultiFile control immediately reverts to the "non-flash" version :-(

chris

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: starting uploads causes Postbacks in DotNetNuke?

Guest-1107

... another thought: As far as I understand everything, the NeatUpload control registers an "OnSubmit" function, as well as DNN's framework does.

It looks to me that the following DNN code causes the trouble:

function WebForm_OnSubmit() {
dnn.controls.submitComp.onsubmit();
return true;
}

I can see that the MultiFile control gets reset just after the above function has been executed...

chris

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: starting uploads causes Postbacks in DotNetNuke?

Guest-1107

That's strange ... after removing and recreating the module in DNN's Module Definition tab it seems to work flawlessly :-D

So I guess it was just a "random error". Thanks anyway!

chris

Loading...