Custom form control AjaxFileUpload

Khoa Nguyen asked on September 7, 2018 05:50

I have custom form control using AjaxFileUpload, but when i try so upload it show an 500 Server Error

Event log

I added in my web.config already

<add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>

In my form control .aspx

<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" UploadHandlerPath="AjaxFileUploadHandler.axd" OnUploadComplete="AjaxFileUpload1_UploadComplete" Mode="Auto" runat="server" />

In .cs file

protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    string filePath = "~/Upload/BizFormFiles/" + e.FileName;

Anyone can help me?

   Please, sign in to be able to submit a new answer.