Validation on Selction with RadUpload.

Thread is closed for posting
4 posts, 0 answers
  1. Raja
    Raja avatar
    13 posts
    Member since:
    Oct 2011

    Posted 11 Oct 2011 Link to this post

    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
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Oct 2011 Link to this post

    Hello Raja,

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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Raja
    Raja avatar
    13 posts
    Member since:
    Oct 2011

    Posted 12 Oct 2011 Link to this post

    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.
  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 13 Oct 2011 Link to this post

    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
Back to Top