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" />
<asp:Button ID="cmdDelete" runat="server" CausesValidation="False"
EnableClientScript="False" Text="Delete" />
<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
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" />
<asp:Button ID="cmdDelete" runat="server" CausesValidation="False"
EnableClientScript="False" Text="Delete" />
<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