Welcome Guest Search | Active Topics | Sign In | Register

Uploader Error Handling Options
Sithz
Posted: Wednesday, July 4, 2007 2:17:26 AM
Rank: Newbie
Groups: Member

Joined: 7/4/2007
Posts: 1
Hi.

Great components, love em.

I might not be thinking very good today, but how can I make my own error handling
on maxfilesize in the Uploader. Like if a user try to upload a file bigger than what is allowed, I would like to show a custom label or message.

There is no "OnError" event to be used, so is there another easy way to do this (C# code).

Thank you in advanced
eo_support
Posted: Wednesday, July 4, 2007 10:51:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
hi, Sithz

Thank you for posting your question here.
To answer your questions, first, I would think it is better to handle it on client side. Since you already know this is an error, why post back to server, and then send back to client and tell user, oops, sorry.
So, for your instance, I would recommend to use client script. Here is an example:
Code: JavaScript
function AJAXUploader1_OnClientError(control, error, message)
{
    alert(control);      //Here, you can do whatever you want. 
    //You can even use our Dialog control to show some fancy dialog.
    alert(error);            
    alert(message);   
}

Set ClientSideOnError="AJAXUploader1_OnClientError"
For detail, please see this link:http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Global.uploader_error_handler.html

Thanks.


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.