As soon as I attach an event to the FileUploadControl it only renders as a little black box. Using framework 4.0, same issue in 35., cant not use 4.5 due to VisualStudio2010 restrictions.
aspx code:
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebUpload_de.aspx.cs" Inherits="WebFileTransfer.WebUpload_de" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<link rel="stylesheet" href="Default.css" type="text/css" media="screen" />
<title>File Upload</title>
</head>
<body>
<form id="form1" runat="server">
<AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</AjaxControlToolkit:ToolkitScriptManager>
<div>
<AjaxControlToolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server"
Width="500px" onclientuploadcomplete="File_Upload" />
</div>
</form>
</body>
</html>
```
Events added to web.config:
```
<system.web>
<httpHandlers >
<add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</httpHandlers>
</system.web>
```
Function defined in code behind:
```
protected void File_Upload(object sender, AjaxFileUploadEventArgs e)
{
string filename = e.FileName;
string strDestPath = Server.MapPath("~/Documents/");
AjaxFileUpload1.SaveAs(@strDestPath + filename);
}
```
People having this issue for about a year now. Any help on this is greatly apreciated!
aspx code:
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebUpload_de.aspx.cs" Inherits="WebFileTransfer.WebUpload_de" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<link rel="stylesheet" href="Default.css" type="text/css" media="screen" />
<title>File Upload</title>
</head>
<body>
<form id="form1" runat="server">
<AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</AjaxControlToolkit:ToolkitScriptManager>
<div>
<AjaxControlToolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server"
Width="500px" onclientuploadcomplete="File_Upload" />
</div>
</form>
</body>
</html>
```
Events added to web.config:
```
<system.web>
<httpHandlers >
<add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</httpHandlers>
</system.web>
```
Function defined in code behind:
```
protected void File_Upload(object sender, AjaxFileUploadEventArgs e)
{
string filename = e.FileName;
string strDestPath = Server.MapPath("~/Documents/");
AjaxFileUpload1.SaveAs(@strDestPath + filename);
}
```
People having this issue for about a year now. Any help on this is greatly apreciated!