RadUpload for ASP.NET AJAX

RadControls for ASP.NET AJAX

If you add a RadProgressManager/RadProgressArea to your Web page or user control, you can include both FileUpload and the standard <input type=file> (file input) HTML elements. However, the standard file inputs are unable to find their files automatically. In order to access the files uploaded using the above controls you need to use the Request.Files collection:

 

Caution

Although you can use standard file input controls with RadProgressArea, do not use them with RadUpload controls. Standard file input controls interfere with the properly functioning of RadUpload.

Note

RadUpload automatically sets the proper enctype property of the form to:

enctype="multipart/form-data" which is needed when you upload a file. The <input type="file"> does not set this property so you need to add it manually.

Example

The following example illustrates how to save the files uploaded with standard file inputs:

CopyASPX
<asp:FileUpload ID="FileUpload1" runat="server" />
<input type="file" runat="server" id="FileUpload2" />
<asp:Button runat="server" ID="Button1" Text="Submit" OnClick="Button1_Click" />

 

See Also