Restricting document type

Thread is closed for posting
2 posts, 0 answers
  1. John
    John avatar
    19 posts
    Member since:
    Jan 2011

    Posted 16 Feb 2011 Link to this post


    How can I restrict the user to select only a docx file for upload and to catch it if it’s not?



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Feb 2011 Link to this post

    Hello John,

    You can set the AllowedFileExtensions property to the desired file types.Then use CustomValidator, either from client side or server side, for checking the file extensions.

    Here is the documentation which explains the same.
    Validating using an ASP.NET validator

  3. DevCraft R3 2016 release webinar banner
Back to Top