Posted on May 12, 2011 (permalink)
Hi
How can I implement client side validation for RadUpload so user is compelled to provide a file name for upload?
Thanks
Regards
Posted on May 13, 2011 (permalink)
<
telerik:RadUpload
ID
=
"RadUpload1"
runat
"server"
>
</
asp:CustomValidator
"CustomValidator1"
ClientValidationFunction
"ClientValidationFunction1"
ErrorMessage
"CustomValidator"
function
ClientValidationFunction1(source, args)
{
args.IsValid =
false
;
var
upload
= $find(
"<%= RadUpload1.ClientID %>"
);
inputs = upload .getFileInputs();
for
(i = inputs.length - 1; i >= 0; i--)
if
(upload .getFileInputs()[i].value !=
""
)
true
return
}
Back to Top
UI controls for ASP.NET AJAX, MVC, WPF, Silverlight, Windows Forms and Windows Phone. Visual Studio productivity tools. Reporting and data layer solutions.
HTML5 / JavaScript tools for Web and Mobile applications
Functional, Performance, Load and Mobile Software Testing
CMS, Mobile Web, Ecommerce, Emarketing, Social Media
Project management software inspired by Agile best practices
It seems you haven't bookmarked any pages. Fix that by clicking the button below