asp.net OnClientClick not rendered for initially disabled Button
<p>I have a disabled asp.Button, which I enable later with JavaScript. Like this</p>

<pre><code>&lt;asp:Button ID="btnSave" runat="server" Text="Save" Enabled="false" OnClientClick="; return ValidateFields();" OnClick="btnSave_Clicked" /&gt;
</code></pre>

<p>However, the "onclick" method is not rendered as html when the control is disabled. My work around is to add the following code in PageLoad.</p>

<pre><code>btnSave.Attributes["onclick"] = "return ValidateFields();";
</code></pre>

<p>Is there a more convenient work around for this?</p>

<p>Thanks</p>
