FileUpload with Custom Validator
<p>Having an issue with fileupload that is being validated by a custom validator.  The textbox value is always empty or null onververvalidate.</p>

<p>ASPX</p>

<pre><code>&lt;asp:CustomValidator ID="cvFileUpload" runat="server" 
                ErrorMessage="Please select file!" ControlToValidate="fuCheatingEvidence" 
                onservervalidate="cvFileUpload_ServerValidate" 
                ValidationGroup="vgSubmitForm" ValidateEmptyText="True"&gt;&lt;/asp:CustomValidator&gt;
            &lt;asp:FileUpload ID="fuCheatingEvidence" runat="server" 
                 Width="890px" Size="50" /&gt;
</code></pre>

<p>CODE BEHIND</p>

<pre><code>protected void cvFileUpload_ServerValidate(object source, ServerValidateEventArgs args)
{
    String fileName = fuCheatingEvidence.PostedFile.FileName;

    if (fileName != "")
    {
        args.IsValid = true;

    }
    else
    {
        args.IsValid = false;
    }

}
</code></pre>

<p>It's just a simple check to see if the FileUpload control is empty or not and later on I will add some more custom validation.</p>
