This is a migrated thread and some comments may be shown as answers.

Validation on Selction with RadUpload.

3 Answers 64 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Raja
Top achievements
Rank 1
Raja asked on 11 Oct 2011, 04:54 PM
HI Team,

I need to Validate a textBox if the RadUpload.UploadedFiles.Count !=0

Something Like this...
if (RadUpload.UploadedFiles.Count !=0)
then Validate TextBox should not be empty
if (RadUpload.UploadedFiles.Count ==0)
then TextBox can be empty.

And can we do this without post-back. Something on Client Side please.. Using JavaScript preferably...

Thanks,
Raja

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Oct 2011, 10:56 AM
Hello Raja,

You can use CustomValidators to validate the RadUpload control. Please go through the online help article.
Required Field Validation.

Thanks,
Princy.
0
Raja
Top achievements
Rank 1
answered on 12 Oct 2011, 04:28 PM
Thanks for the Quick response Princy.
But here I need to validate A text box next to RadUpload.
Something like this
--- If RadUpload.UploadedFiles.Count !=0 then validation on TextBox  "enter somevalue in the textbox"
  --- If user uploads a Check in RadUpload, then they have to enter Check No in the TextBox (Something like this).
If no Upload then the TextBox can be empty.
0
Peter Filipov
Telerik team
answered on 13 Oct 2011, 02:16 PM
Hi Raja,

You can use the following demo for your scenario. Before page submit you can iterate with JQuery through all inputs type="text" in RadUpload and check their values and alert the user.

Best wishes,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Upload (Obsolete)
Asked by
Raja
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Raja
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or