DateTime.Now.Year to fill maximum value in RangeValidator
<p>I am using a RangeValidator to validate that a year is between a static start year and a dynamic end year (the current year). I am drawing a huge blank for setting the maximum value in this fashion:</p>

<pre><code>MaximumValue='&lt;% DateTime.Now.Year %&gt;'
</code></pre>

<p>Any help is appreciated as I usually don't set max values in this fashion.</p>

<p>Edit:
So I have been given the following ways to incorporate the code into the codebehind:</p>

<ol>
<li>validator init event</li>
<li>page prerender</li>
<li>and i'm a newb and would just have done on page load</li>
</ol>

<p>which is best?</p>
