Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 21, 2012 09:26 PM by Trover
Member
34 Points
22 Posts
Feb 20, 2012 11:45 PM|LINK
I have a Ajax AsyncFileUpload control. Save the image is not a problem. The problem is that the method UploadedComplete not ejecute extra code, for example:
protected void afuSubirArchivo_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) {
//code for save image this.Label1.Text = "Textitito"; }
The line 2 inside from the metodh is not execute, and then the property Text from Label1 not change.
I has performed tests, for example, provocate click of a button since javascript, but the result is the same, no execution.
Feb 20, 2012 11:50 PM|LINK
Aditional Data (xml)
<asp:UpdatePanel runat="server" ID="pepe"> <ContentTemplate> <ajaxToolkit:AsyncFileUpload ID="afuSubirArchivo" runat="server" onuploadedcomplete="afuSubirArchivo_UploadedComplete" CompleteBackColor="White" PersistFile="True" /> </ContentTemplate> </asp:UpdatePanel>
All-Star
66619 Points
11270 Posts
Feb 21, 2012 02:17 AM|LINK
Hi, Please refer this
http://forums.asp.net/p/1603720/4091733.aspx
http://forums.asp.net/p/1608737/4111605.aspx
Feb 21, 2012 09:26 PM|LINK
The solution has been.. Use a javascript method OnClientUploadComplete="uploadImage":
function uploadImage() { uploadError = false; __doPostBack('ctl00$MainContent$btnUPload', ''); }
Then all code is executed
Trover
Member
34 Points
22 Posts
AsyncFileUpload not ejecute code from your method UploadedComplete
Feb 20, 2012 11:45 PM|LINK
I have a Ajax AsyncFileUpload control. Save the image is not a problem. The problem is that the method UploadedComplete not ejecute extra code, for example:
protected void afuSubirArchivo_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
//code for save image
this.Label1.Text = "Textitito";
}
The line 2 inside from the metodh is not execute, and then the property Text from Label1 not change.
I has performed tests, for example, provocate click of a button since javascript, but the result is the same, no execution.
Trover
Member
34 Points
22 Posts
Re: AsyncFileUpload not ejecute code from your method UploadedComplete
Feb 20, 2012 11:50 PM|LINK
Aditional Data (xml)
<asp:UpdatePanel runat="server" ID="pepe">
<ContentTemplate>
<ajaxToolkit:AsyncFileUpload ID="afuSubirArchivo" runat="server"
onuploadedcomplete="afuSubirArchivo_UploadedComplete"
CompleteBackColor="White" PersistFile="True" />
</ContentTemplate>
</asp:UpdatePanel>
chetan.sarod...
All-Star
66619 Points
11270 Posts
Re: AsyncFileUpload not ejecute code from your method UploadedComplete
Feb 21, 2012 02:17 AM|LINK
Hi, Please refer this
http://forums.asp.net/p/1603720/4091733.aspx
http://forums.asp.net/p/1608737/4111605.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Trover
Member
34 Points
22 Posts
Re: AsyncFileUpload not ejecute code from your method UploadedComplete
Feb 21, 2012 09:26 PM|LINK
The solution has been.. Use a javascript method OnClientUploadComplete="uploadImage":
function uploadImage() {
uploadError = false;
__doPostBack('ctl00$MainContent$btnUPload', '');
}
Then all code is executed