Re: How do you set validation options for the Uploader programatically?

  •  01-14-2013, 8:20 AM

    Re: How do you set validation options for the Uploader programatically?

    Hi AtomP,

     

    You can set it programatically in event page load. Like below

     

    1. protected override void OnLoad(EventArgs e)  
    2.    {  
    3.        if (Context.User.Identity.Name == "David")  
    4.        {  
    5.            Uploader1.ValidateOption.AllowedFileExtensions = "jpg,gif";  
    6.        }  
    7.        if (Context.User.Identity.Name == "Mary")  
    8.        {  
    9.            Uploader1.ValidateOption.AllowedFileExtensions = "pdf,txt";  
    10.        }  
    11.        base.OnLoad(e);  
    12.    }  
     

    Regards,

     

    Ken 

View Complete Thread