Telerik RadAjax controls allow you to force specific controls to
make postback requests instead of AJAX ones even when they are wrapped inside a
RadAjaxPanel or ajaxified by a RadAjaxManager controls.
That is especially useful for file uploads as due to the specifics of Internet
forms, files are uploaded only during postback requests.
The button Save executes AJAX request when the file input is empty and postback
request if a file is chosen.
In order to force a control to make postbacks you need to handle the OnRequestStart
client-side event and set the EnableAjax property to false like this:
function OnRequestStart(target, arguments)
{
var fileUpload = document.getElementById("FileUpload1");
if (fileUpload.value != "")
{
arguments.EnableAjax = false;
}
}
Please Note: If you enter an invalid filename you will receive a browser
security message.