ValidateFileEventArgsIsValid Property |
Namespace: Kettic.AspNet.Controls.UploadAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic bool IsValid { get; set; }
Public Property IsValid As Boolean
Get
Set
public:
property bool IsValid {
bool get ();
void set (bool value);
}
member IsValid : bool with get, set
Property Value
Type:
Booleantrue to indicate that the value specified by the
UploadedFile property passed
validation; otherwise,
false
Remarks
Once your validation routine finishes, use the IsValid
property to indicate whether the value specified by the
UploadedFile property
passed validation. This value determines whether the file from the
KaxUpload control passed validation.
Examples
This example demonstrates how to implement validation for filenames.
private void KaxUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
{
if (e.UploadedFile.GetExtension().ToLower() == ".zip")
{
e.IsValid = false;
}
}
Private Sub KaxUpload1_ValidatingFile(ByVal sender As Object, ByVal e As WebControls.ValidateFileEventArgs) Handles KaxUpload1.ValidatingFile
If e.UploadedFile.GetExtension.ToLower() = ".zip" Then
e.IsValid = False
End If
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also