Hi Guys,
I'm using the AJAX HTML Extender for a form in my Web App. I would like to allow users to insert an image from an external URL. But when I add the Insert Image button it brings up the Upload Image dialog Box. This would be fine as a solution but the Upload Box doesn't upload or compile.
When I try to run my application in Debug mode I get the following error:
Unhandled exception at line 241, column 5 in http://localhost:56057/Admin/dev/HTML.aspx
0x800a1391 - JavaScript runtime error: 'ajaxFileUpload_OnUploadComplete' is undefined
If there is a handler for this exception, the program may be safely continued
What is the issue here? My Code is as follows;
<div><cc1:ToolkitScriptManager ID="ScriptManager" runat="server" /><cc1:AjaxFileUpload ID="ajaxFileUpload" runat="server" OnClientUploadComplete="ajaxFileUpload_OnUploadComplete" /></div>
C#
protected void ajaxFileUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
string filePath = "~/Images/" + e.FileName;
ajaxFileUpload.SaveAs(MapPath(filePath));
}Does any know what is wrong here?