Try this code in server side of CustomValidator
protected void CustomValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
if (IsValid)
{
int maxSize = 5 * 1024 * 1024;
if (FileUpload1.PostedFile.ContentLength > maxSize)
{
args.IsValid = false;
}
}
}
Good Luck
Friday, October 31, 2008
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment