Welcome Guest Search | Active Topics | Sign In | Register

eo:AJAXUploader with asp:Updatepanel and asp:Multiview OnFileUploaded Options
RefreshMI
Posted: Friday, October 19, 2007 6:50:49 AM
Rank: Newbie
Groups: Member

Joined: 10/9/2007
Posts: 2
I have a problem with the eo:AJAXUploader.

The eo:AJAXUploader control works perfect in my page when it's nested in a MultiView without the Updatepanel. But when I put an update panel around the Multiview the AJAXuploader wont execute the OnFileUploaded function? I just can't figure out what the problem is...

Do you have any suggestions?

Thanks
Code: HTML/ASPX
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel runat="server" ID="Up1">
<ContentTemplate>
    <eo:ProgressBar runat="server" ID="prog1"></eo:ProgressBar>
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
		
		<asp:View ID="View1" runat="server">
		    
				</Columns>
			</asp:GridView>
		</asp:View>

		<asp:View ID="View2" runat="server">
		

            <asp:Panel ID="pnlZip" runat="server">
			
                <eo:AJAXUploader runat="server" id="fuFiles" OnFileUploaded="clkFunction"  Width="700px" TempFileLocation="~//" 
                    ProgressTextFormat="tr><td>Filename:</td><td width='10px'></td><td> {current_file_name}</td></tr><tr><td>Uploaded:</td><td></td><td> {transferred} bytes of {total} bytes </td></tr><tr><td>Percentage:</td><td></td><td> {percentage}%</td></tr><tr><td>Time elapsed:</td><td></td><td> {elapsed_seconds} sec. </td></tr><tr><td>Time remaining:</td><td></td><td> {estimated_remaining_seconds} sec. </td></tr></table> " 
                    MaxDataSize="50000" AutoPostBack="true" >
                 <LayoutTemplate>            
                        <table cellspacing="0" cellpadding="0" style="width:600px;" border="0">
			                <tr>
				                <td><asp:PlaceHolder id="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder></td>
			                </tr>
			                <tr>
				                <td align="right"><asp:Button id="UploadButton" runat="server" Text="Upload"></asp:Button></td>
			                </tr>
			                <tr>
				                <td align="right"><eo:ProgressBar id="ProgressBar" runat="server" ControlSkinID="Windows_Vista"></eo:ProgressBar></td>			    
			                </tr>
			                <tr>
			                    <td><asp:PlaceHolder id="ProgressTextPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder><br /><asp:Button id="CancelButton" runat="server" Text="Cancel"></asp:Button></td>
			                </tr>
		                </table>
                    </LayoutTemplate>
                </eo:AJAXUploader>
            </asp:Panel>
         
		</asp:View>
		
		<asp:View ID="View3" runat="server">
			
			
		</asp:View>
	
	</asp:MultiView>

</ContentTemplate>
</asp:UpdatePanel>
eo_support
Posted: Friday, October 19, 2007 8:04:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to put a hidden AJAXUploader outside of the UpdatePanel:

Code: HTML/ASPX
<eo:AJAXUploader 
    runat="server" ID="dummy" TempFileLocation="~//" style="display:none">
</eo:AJAXUploader>
<asp:UpdatePanel runat="server" ID="Up1">
 .....
</asp:UpdatePanel>


The reason is when the page is first loaded, it didn't have the AJAXUploader JavaScript files, which is needed for it to function. Once you put a hidden uploader in the page outside of the UpdatePanel, the page would always have all the JavaScript files it needed. The hidden AJAXUploader itself will never be visible or do anything.

Thanks
RefreshMI
Posted: Friday, October 19, 2007 8:11:09 AM
Rank: Newbie
Groups: Member

Joined: 10/9/2007
Posts: 2
Thanks a lot,

Seems to work real fine now...!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.