Hello telerik,
This is my first time using the telerik. I want to know how to add the following judgments in JavaScript or events. And also remove the image which does not fit the criteria at the same time.
For example, I need type in a text box '123' and upload an image called '123.jpg', then it is allowed to upload, because '123'='123'.But if I type in a text box '123' and upload an image called 'abc.jpg', it is not allowed to upload, because '123'<>'abc', then auto remove the image and reselect. how can I do it, please help me.
the following is my code.
<telerik:RadTextBox ID="txtContainer" runat="server" OnTextChanged ="txtContainer_TextChanged" AutoPostBack ="true" ></telerik:RadTextBox>
<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="AsyncUpload1" AllowedFileExtensions="jpeg,jpg,gif,png,bmp" OnFileUploaded="RadAsyncUpload1_FileUploaded1" OnClientValidationFailed="onClientValidationFailed" MaxFileInputsCount="1" > </telerik:RadAsyncUpload>
<script type="text/javascript">
function onClientValidationFailed(sender, args) {
$telerik.$(".ruCancel").parent().remove();
alert("Allowed files extension is jpeg,jpg,gif,png,bmp");
sender.addFileInput();
}
</script>