New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Cloud Upload Validation

Select file for validation - only images(.jpg, .gif) under 3MB could be uploaded


The example demonstrates how the RadCloudUpload could be configured to validate the selected file for upload by size and extension.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="CloudUpload.Examples.Functionality.Validation.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <qsf:MessageBox ID="LocalhostInfoPanel" Type="Info" Icon="Info" runat="server" Visible="false">
            <b>Note</b>: If you are viewing this demo locally, you need to configure RadCloudUpload via the Design-time Wizard in order to run the example.
                 For more details, check out the online help <a href="">articles</a>.
    <div class="demo-container size-medium">
        <h3 class="additional-text">Select file for validation - only images(.jpg, .gif) under 3MB could be uploaded</h3>
        <telerik:RadCloudUpload ID="RadCloudUpload1" runat="server" RenderMode="Lightweight" MultipleFileSelection="Automatic" OnFileUploaded="RadCloudUpload1_FileUploaded" AllowedFileExtensions=".jpg,.jpeg,.gif" ProviderType="Azure" MaxFileSize="3145728">

Support & Learning Resources

Find Assistance