Applying Validation

Jul 9, 2008 at 11:21 AM
Is it possible to apply requiredfieldvalidation with this control.
i tried to get name of the file in a textbox while uploading,  and then applied validation to that textbox. it didn't work. any other ideas.
Jul 17, 2008 at 2:49 PM
Hi, I have the same problem. I download the source code but it seems that this control isn't an .ascx control. So, reviewing the source code there's a "render" metod at the file FileUploader.cs, in which it seems that writes the <input type="file"> tag,  but it didn't writes the "id" prperty of this tag. Why??? Do you think that if I modify the source and put the "id" property at this code line, I will be able to find the control in order to apply validation method at client side?? Thanks in advance. So, I was forgetting another question, if you download the source code, I cant open the project per se, because I have a VS2005 and it seems the project is compiled at VS2008, I guess. HOw can I compile the project again for obtain the FUA.dll file??
Jul 18, 2008 at 3:54 AM
I compiled it just fine in VS2005. There's a project file in there that you can open.
Jul 18, 2008 at 3:58 AM


hello_swe wrote:
Is it possible to apply requiredfieldvalidation with this control.
i tried to get name of the file in a textbox while uploading,  and then applied validation to that textbox. it didn't work. any other ideas.


Which part didn't work, loading the file name into the textbox or validating it?
You're doing this client-side, right?

Although, from the way I'veseen it work, it seems you shouldn't need to put it in a textbox unless you have some other reason for it. I'm not sure, but maybe you could do your validation in the preUpload event?
http://en.fileuploadajax.subgurim.net/ejemplos/customJavascript.aspx