Re: Avoiding postbacks

  •  08-23-2010, 11:44 PM

    Re: Avoiding postbacks

    Hi,
     
    For security reason,
     
    Uploader must do that postback once to validate the uploaded file , via the uploader object in that page.
     
    So it's not just for FileValidating event.
     
    If you must doing something in Page_Load which is conflict with the uploader,
     
    I suggest you move the code to Page's LoadComplete event.
     
    Or you can use this code to determine whether the uploader is doing such postback:
     
       string validating;
       System.Collections.Specialized.NameValueCollection nvc;
       nvc=(System.Collections.Specialized.NameValueCollection)Context.Items["CuteWebUI.AjaxUploader.QueryString"];
       if(nvc!=null)
        validating=nvc["_UploadControlID"];
       else
        validating=Context.Request.QueryString["_UploadControlID"];
       if(!string.IsNullOrEmpty(validating))
           return;
       
    Regards,
    Terry
View Complete Thread