c# - Required Field Validator + AsyncFileUpload -
i have been trying apply default asp.net required field validator asyncfileupload control (from ajax control toolkit).
the scenario
i have created web user control. let’s call wucfileupload.
wucfileupload has ajax update panel wrapping required field validator , asyncfileupload. (i have use ajax update panel particular reasons).
wucfileupload going used in many pages, , in of them, control going generated automatically, not know how many of them have per page.
wucfileupload has property called required. if required true, enable required field validator, check if asyncfileupload has been filled @ least once.
my try
i found this solution here on stackoverflow, , tried apply it. however, case little bit different, 1 represented on question.
my thoughts
i liked idea of having hidden textbox or hiddenfield. because single asyncfileupload can upload n number of files.
the textbox could value on first time onclientuploadcomplete runs… way i’ll know user has uploaded @ least 1 image.
but need way of clearing textbox, because user can delete image uploaded. , if that, field must validated again.
thanks in advanced, , sorry bad english. :)
Comments
Post a Comment