Gets or sets whether the value specified by
UploadedFile property passed
validation.
Namespace: Telerik.WebControls
Assembly: RadUpload (in RadUpload.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property IsValid As Boolean |
| C# | |
|---|
public bool IsValid {get; set;} |
Return Value
true to indicate that the value specified by the
UploadedFile property passed
validation; otherwise,
false
Example
This example demonstrates how to implement validation for filenames.
| 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
e.IsValid = False
End If
End Sub
|
| C# | Copy Code |
|---|
private void RadUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
{
if (e.UploadedFile.GetExtension().ToLower() == ".zip")
{
//The zip files are not allowed for upload
e.IsValid = false;
}
}
|
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