File Upload Validation

Discussion in 'ASP .Net' started by Webmills, Apr 17, 2006.

  1. Webmills

    Webmills Guest

    Hi

    I have a form containing a

    File Upload Control,
    Required Field Validator (connected to the file upload control)
    RegularExpressionValidator (connected to the file upload control,
    validating the file types for upload)
    OK button, calling an event

    All four belong to the same validation group.

    My problem is this...

    When I submit the form, all validation works as expected and required.

    However, I would like to check for the existance of the file within the
    OK event and report back to the user if the file exists, cancelling the
    upload.

    When this happens, validation seems a bit off. The page is refreshed,
    the file upload control emptied (I assume automatically for security
    reasons) and RegularExpressionValidator is fired and reports false,
    even though the file upload field is blank! The RequiredFieldValidator
    does not fire.

    Any thoughts would be gratefully received!
    Webmills, Apr 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,430
    Bruce Barker
    Aug 3, 2005
  2. Heather Fraser
    Replies:
    0
    Views:
    619
    Heather Fraser
    Jul 5, 2004
  3. Replies:
    1
    Views:
    922
    Gabriel Genellina
    Nov 25, 2006
  4. Prakash
    Replies:
    3
    Views:
    447
    Ray at
    Nov 12, 2003
  5. Alejandrina

    File Upload Validation

    Alejandrina, Nov 24, 2003, in forum: Javascript
    Replies:
    0
    Views:
    90
    Alejandrina
    Nov 24, 2003
Loading...

Share This Page