Gets or sets whether the internal validation should continue validating the file
specified by the
UploadedFile property.
Namespace: Telerik.WebControls
Assembly: RadUpload (in RadUpload.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property SkipInternalValidation As Boolean |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ValidateFileEventArgs
Dim value As Boolean
instance.SkipInternalValidation = value
value = instance.SkipInternalValidation
|
| C# | |
|---|
public bool SkipInternalValidation {get; set;} |
Return Value
false to indicate that the internal validation should validate
the file specified by the
UploadedFile property; otherwise,
true
Example
This example demostrates how to implement custom validation for specific file type.
| Visual Basic | Copy Code |
|---|
Private Sub RadUpload1_ValidatingFile(ByVal sender As Object, ByVal e As WebControls.ValidateFileEventArgs) Handles RadUpload1.ValidatingFile
If e.UploadedFile.GetExtension.ToLower = ".zip" Then
Dim maxZipFileSize As Integer = 10000000
If e.UploadedFile.ContentLength > maxZipFileSize Then
e.IsValid = False
End If
e.SkipInternalValidation = True
End If
End Sub
|
| C# | Copy Code |
|---|
private void RadUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
{
if (e.UploadedFile.GetExtension().ToLower() == ".zip")
{
int maxZipFileSize = 10000000; //~10MB
if (e.UploadedFile.ContentLength > maxZipFileSize)
{
e.IsValid = false;
}
//The zip files are not validated for file size, extension and content type
e.SkipInternalValidation = true;
}
}
|
Remarks
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also