Validation Firing eventhough it shouldn't

J

John Talli

Search: Master Page, Content Page, Validation, User Control, UserControl


I have a Master Page with the following content page (below). The controls are in the
user-control ucPrs_Who_Basic:tgPrs_Who_Basic. The buttons are in the content page and
the textboxes are in the user-control.

Why is the validation firing for cmdDelete although the cmdCancel button does not cause
them to fire. I don't want the validation to fire since the cmdDelete is just going to
delete the user.

Thanks


<asp:Content ID="Content1" ContentPlaceHolderID="cph_gmbBlog" Runat="Server">
<ucProgramPageHeader:tgProgramPageHeader ID="ucProgramPageHeader_Ctl" runat="server"
/>
<table class="noBorder">
<%--It has TRs each with four TDs--%>
<ucPrs_Who_Basic:tgPrs_Who_Basic ID="ucPrs_Who_Basic_Ctl" runat="server" />
<tr>
<td colspan="4">
<table>
<%--Buttons--%>
<tr>
<td colspan="4" align="center">
<asp:HiddenField ID="hdnIsFirstTimeThru" runat="server" Value="1"/>
<asp:Button ID="cmdSave" runat="server" ValidationGroup="rfvg_Submit"
Text="Save" />
&nbsp;&nbsp;
<asp:Button ID="cmdDelete" runat="server" CausesValidation="False"
EnableClientScript="False" Text="Delete" />
&nbsp;&nbsp;
<asp:Button ID="cmdCancel" runat="server" CausesValidation="False"
EnableClientScript="False" Text="Cancel"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>

CODE BEHIND
===========
Protected Sub cmdCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles cmdCancel.Click
Dim bool_Is_It_Here As Boolean
End Sub

Protected Sub cmdDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles cmdDelete.Click
Dim bool_Is_It_Here As Boolean
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top