title: How do I load an ErrorMessage on a CustomValidator from a resource file?
body: <p>I would like to load the <code>ErrorMessage</code> for my <code>CustomValidator</code> from a resource file.</p>
  
  <p>I have my <code>CustomValidator</code> set up like so:</p>
  
  <pre><code>&lt;asp:CustomValidator ID="cv1" runat="server" ControlToValidate="txt1" 
          ErrorMessage="TEXT TO BE LOCALIZED" OnServerValidate="cv1_Validate" /&gt;
  </code></pre>
  
  <p>And my validation method is as follows:</p>
  
  <pre><code>protected void cv1_Validate(object source, ServerValidateEventArgs e)
  {
      if (FalseCondition)
      {
          e.IsValid = false;
      }
      else
      {
          e.IsValid = true;
      }
  }
  </code></pre>
  
  <p>The validation works correctly, but I would like to have the <code>ErrorMessage</code> be pulled from my local resources file.</p>
  
  <p><strong>EDIT</strong>: I'm also curious if there is any way to do this using <code>meta:resourcekey</code>.</p>