Asked by:
file upload control with percentage progress bar

Question
-
User-398804652 posted
hi,
i am using MattBerseth.WebControls.AJAX.Progress. I used this control in usercontrol inside content page.
the control is loading in page load. but when i starts uploading a file, it simply shows "Initializing upload.."
This means it is not taking to the upload.aspx page.i put a break point in pageload event of upload.aspx but its not taking me to the page load once when i click on upload button. The below part is not working in content page.
intervalID = window.setInterval(function(){
PageMethods.GetUploadStatus(function(result){
if(result){
// update the progressbar to the new value
progressBar.set_percentage(result.percentComplete);
// upadte the message
updateMessage('info', result.message);
if(result == 100){
// clear the interval
window.clearInterval(intervalID);
}
}
});
}, 500);
i put all the javascript in content page not in usercontrol.
not getting whats the problem? please help on this.
Monday, March 1, 2010 8:09 AM
All replies
-
User-398804652 posted
nobody knows about this?
Tuesday, March 2, 2010 5:01 AM -
User-1364446067 posted
Do you see any JS error in calling this "PageMethods.GetUploadStatus" ?
--
Mark as answer, if it answers you..
--
Tuesday, March 2, 2010 5:07 AM -
User-398804652 posted
no errors but its not taking to upload.aspx page.but in the sample application given its taking to the upload.aspx after executing the above given lines
Tuesday, March 2, 2010 11:02 AM -
User-1364446067 posted
Where and How exactly is your method written to get the status?
Have you enabled 'EnablePageMethods = true' to your ScriptManager?
--
Mark as answer, if it answers you..
--
Wednesday, March 3, 2010 5:11 AM -
User-398804652 posted
yes i did enabled page methods in master page script manager.Do i need to put the entire code?
Wednesday, March 3, 2010 5:19 AM -
User-1364446067 posted
I am no sure about your method 'GetUploadStatus'. Please put code..
Moreover, please confirm that the page containing this method should have the calling method in the aspx code. It shouldn't be in this way that 'GetUploadStatus' method is ne some other page and you have called it from some other page's aspx.
--
Mark as answer, if it answers you..
--
Wednesday, March 3, 2010 6:38 AM