c# - AjaxFileUpload inside a Panel not working -


hello i'm having trouble getting ajaxfileupload control work properly. have working on different page, using identical code, not inside of panel on page. functions , allows me select files , hits 'onuploadcomplete' function, crashing on .saveas giving me nullreferenceexception. put ghostupload control @ start of page @ recommendation after finding others similar problems , necessary or control doesn't work @ all.

aspx code (outside panel)

<div style="display:none"> <ajaxcontroltoolkit:ajaxfileupload id="ghostajaxfileupload"     runat="server" onuploadcomplete="ajaxfileupload_uploadcomplete" /></div> 

aspx code (inside panel)

<ajaxcontroltoolkit:ajaxfileupload id="ajaxupload1" runat="server" throbberid="loader123" allowedfiletypes="jpg,jpeg" maximumnumberoffiles="2" onuploadcomplete="ajaxfileupload_uploadcomplete" /><asp:image id="loader123" imageurl="images/loading.gif" style="display:none" runat="server" /> 

aspx.cs code

protected void ajaxfileupload_uploadcomplete(object sender, ajaxcontroltoolkit.ajaxfileuploadeventargs e)     {     //...other logic/file checking (working fine)     ajaxupload1.saveas(appsession.globalimagefolder + appsession.globalproductimagefolder + filename);     } 

been working on 1 day , it's got me stumped! ajaxfileupload i'm hoping won't have resort different upload control. appreciate on one!

cheers, jordan


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -