title: Reusing expression in asp.NET regex validation control
body: <p>I have this in an ascx file:</p>
  
  <pre><code>&lt;asp:textbox ID="AddHourlyRate" runat="server" width="55px" /&gt;
  &lt;asp:RegularExpressionValidator  ID="AddHourlyRateRegexValidator"
      ErrorMessage="Please enter a valid charge rate (whole number only)" 
      ValidationExpression="^\$?[0-9]+(\.[0]{2})?$" ControlToValidate="AddHourlyRate" 
      Display="Dynamic" runat="server" /&gt;
  </code></pre>
  
  <p>How can I reuse the <code>ValidationExpression</code> in other <code>asp:RegularExpressionValidator</code>s without having to copy-paste the regex expression?  I am new to asp.NET.</p>