Client Side Validation
<p>I have a field on an asp.net page for which I have used <code>RequiredFieldValidator</code>.</p>

<pre><code>&lt;tr&gt; 
  &lt;td align="left" style="width: 130px"&gt; 
    &lt;asp:Label ID="LblPagename" runat="server" Text="Page Name " CssClass="label"&gt;&lt;/asp:Label&gt;&lt;font 
      color="red"&gt; *&lt;/font&gt; 
  &lt;/td&gt; 
  &lt;td align="left" style="width: 1087px" class="layout-grid"&gt; 
    &lt;asp:TextBox ID="TxtPageName" runat="server" MaxLength="50" &gt;&lt;/asp:TextBox&gt; 
    &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" Display="Dynamic" 
      ValidationGroup="Save" ControlToValidate="TxtPageName" ForeColor="Red"
      ErrorMessage="Please enter Page Name."&gt;&lt;/asp:RequiredFieldValidator&gt;  
  &lt;/td&gt; 
&lt;/tr&gt;
</code></pre>

<p>on save I am allowing <code>CauseValidation="true"</code> for the the same <code>ValidationGroup</code> as mentioned above</p>

<pre><code>&lt;tr&gt; 
  &lt;td colspan="3" align="center" style="width: 1193px"&gt; 
    &lt;asp:ImageButton ID="btnMenu" CausesValidation="true" ValidationGroup="Save" ImageUrl="~/Images/Save.png"  
      runat="server" OnClick="btnMenu_Click" OnClientClick="SaveFunctionalities();"/&gt; 
    &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 
    &lt;asp:ImageButton ID="btnCancelMenu" ImageUrl="~/Images/btnCancel.png" runat="server" 
      OnClick="btnCancelMenu_Click" /&gt; 
  &lt;/td&gt; 
&lt;/tr&gt;
</code></pre>

<p>But on save, along with the error message for the empty field, the save is being called.</p>

<p>The same thing is working fine on other pages.</p>

<p>The only difference is that here I have a javascript function call on <code>OnClientClick</code>.</p>

<p>Is that causing some problem?</p>
