Re: Limit Number of Uploads

Last post 08-29-2008, 12:08 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  08-28-2008, 12:42 PM 43348

    Re: Limit Number of Uploads

    Hello all:
     
       Does anyone know if there is an option for limiting the number of uploads? I know there is a validation for the size, but I do not see one for number of uploads. I guess I could write this based on the number of args but I jus figured that there would be a simpler way.
     
    Thanks in advance.
     
    Regards,
    Dennis Gilgallon
  •  08-29-2008, 12:08 AM 43357 in reply to 43348

    Re: Limit Number of Uploads

    Dennis Gilgallon,
     
    Hi,
     
    Currently the Uploader do not support this feature directly.
     
    You can use the ctrl.InsertButtonID="MyCustomButton" to implement your request.
     
    (Please check the customize UI demo)
     
    at the OnPreRender event , you can check the count and disable the MyCustomButton like this way :
     
    override protected void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        if(ctrl.Items.Count > 4 )
            MyCustomButton.Enabled=false;
        else
            MyCustomButton.Enabled=true;
    }
     
    Regards , Terry .
View as RSS news feed in XML