<Control>.Focus() from server side doesn't scroll into view
<p>Custom Validation Control:</p>

<pre><code>&lt;asp:CustomValidator
ID="valSex" runat="server" ErrorMessage="1.2 &amp;lt;b&amp;gt;Sex&amp;lt;/b&amp;gt; not specified"
EnableClientScript="true" ClientValidationFunction="ValidateSex" SetFocusOnError="True"&gt;Selection required&lt;/asp:CustomValidator&gt;
</code></pre>

<p>Client Side validation routine:</p>

<pre><code>function ValidateSex(source, args) {

    var optMale = document.getElementById("&lt;%=optMale.ClientID %&gt;");
    var optFemale = document.getElementById("&lt;%=optFemale.ClientID %&gt;");

    if (!optMale.checked &amp;&amp; !optFemale.checked) {
        args.IsValid = false;
        optMale.focus();
    }
    else
        args.IsValid = true;
}
</code></pre>

<p>When the page is submitted and Sex is not specified, focus is set but the 2 radio buttons are not quite in view, vertical scrolling is required to bring them into view.</p>

<p>Shouldn't the Focus() method have brought the focus control into view?</p>
