Currently, i have a working function that will let user to upload an excel file and thn insert the excel file data into the SQL Server. So, they might be thousand of records in an excel file, i would like to have a message like "Please wait while uploading..." during the process! i have tried on the update progress and javascript but both of them do not work! u guys have any idea?
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
var postBackElement;
function InitializeRequest() {
if (prm.get_isInAsyncPostBack())
args.set_cancel(true);
postBackElement = args.get_postBackElement();
if (postBackElement.id == 'btnUpload')
$get('UpdateProgress1').style.display = 'block';
alert("Please wait...");
}
function EndRequest(sender, args) {
if (postBackElement.id == 'btnUpload')
$get('UpdateProgress1').style.display = 'none';
}