My implementation prevents me from using the traditional OnFileUploaded event since there are several instances of this control and each needs to be tied to a ticketID that is contained in a hidden field. I was able to get a reference to the uploader object that is relevant to the button that fired the event like this:
At least, I'm pretty sure it is because I can see all of the relevent settings and such inside of it during debug. Now, what I want to do is send this control into a webmethod in the page codebehind so that I can interate through all the files and send them to a database. I tried to do so like this:
And of course I enabled pagemethods in the ScriptManager. What is happening is ...well nothing. The page doesn't throw and error, but its also not showing that it is actually getting through to the webmethod. I set the webmethod to throw an exception if it ever got that far, but it never does. When I step through debug, the debug finishes before it ever gets to the webmethod:
Can anyone help? I'm sure I'm missing something minor
$(
".SubmitFiles"
).click(
function
() {
var
uplodrID = $(
this
).closest(
".AddAttachment"
).find(
".Uploader"
).attr(
"ID"
);
var
upldrObj = $find(uplodrID);
//this is the telerik asyncupload control
});
At least, I'm pretty sure it is because I can see all of the relevent settings and such inside of it during debug. Now, what I want to do is send this control into a webmethod in the page codebehind so that I can interate through all the files and send them to a database. I tried to do so like this:
PageMethods.ProcessUpload(upldrObj);
And of course I enabled pagemethods in the ScriptManager. What is happening is ...well nothing. The page doesn't throw and error, but its also not showing that it is actually getting through to the webmethod. I set the webmethod to throw an exception if it ever got that far, but it never does. When I step through debug, the debug finishes before it ever gets to the webmethod:
[WebMethod()]
public
static
void
ProcessUpload(RadAsyncUpload upld)
{
throw
new
Exception(
"Stub"
);
}
Can anyone help? I'm sure I'm missing something minor