validationgroup

Validate() function doesn't fire

别来无恙 提交于 2020-01-07 09:54:08
问题 Here is my button. <asp:Button ID="btnNext" runat="server" Text="Next" Style="display: none" OnClick="btnNext_Click" CausesValidation="true" ValidationGroup="vgLinR"/> When I write ValidationGroup="vgLinR" in aspx side validation works. But I have 2 different validation group. So I need fire these 2 validation group in one button. so I write that code at code behind : protected void btnNext_Click(object sender, EventArgs e) { Page.Validate("vgLinR"); Page.Validate("vgLogR"); } but it doesn't

RequiredFieldValidator with ValidationGroup doesn't validate

放肆的年华 提交于 2020-01-01 11:48:12
问题 Here's my markup: Name: <asp:TextBox ID="txtNewName" runat="server" ValidationGroup="NewDepartmentValidationGroup" /> <asp:RequiredFieldValidator ID="vldtxtNewName" runat="server" ControlToValidate="txtNewName" ErrorMessage="Required Field" /><br /> Description: <asp:TextBox ID="txtNewDescription" runat="server" ValidationGroup="NewDepartmentValidationGroup"/> <asp:RequiredFieldValidator ID="vldtxtNewDescription" runat="server" ControlToValidate="txtNewDescription" ErrorMessage="Required

RequiredFieldValidator with ValidationGroup doesn't validate

末鹿安然 提交于 2020-01-01 11:48:07
问题 Here's my markup: Name: <asp:TextBox ID="txtNewName" runat="server" ValidationGroup="NewDepartmentValidationGroup" /> <asp:RequiredFieldValidator ID="vldtxtNewName" runat="server" ControlToValidate="txtNewName" ErrorMessage="Required Field" /><br /> Description: <asp:TextBox ID="txtNewDescription" runat="server" ValidationGroup="NewDepartmentValidationGroup"/> <asp:RequiredFieldValidator ID="vldtxtNewDescription" runat="server" ControlToValidate="txtNewDescription" ErrorMessage="Required

RequiredFieldValidator with ValidationGroup doesn't validate

谁说胖子不能爱 提交于 2019-12-04 11:00:38
Here's my markup: Name: <asp:TextBox ID="txtNewName" runat="server" ValidationGroup="NewDepartmentValidationGroup" /> <asp:RequiredFieldValidator ID="vldtxtNewName" runat="server" ControlToValidate="txtNewName" ErrorMessage="Required Field" /><br /> Description: <asp:TextBox ID="txtNewDescription" runat="server" ValidationGroup="NewDepartmentValidationGroup"/> <asp:RequiredFieldValidator ID="vldtxtNewDescription" runat="server" ControlToValidate="txtNewDescription" ErrorMessage="Required Field" /><br /> <asp:Button ID="cmdCreate" runat="server" Text="Create" ValidationGroup=

How to validate against Multiple validation groups?

狂风中的少年 提交于 2019-11-30 03:12:09
问题 I have two validation groups: parent and child I have an add button that needs to only validate the child validation group which is easily done. The save button needs to validate against the parent and child validation groups, both client side and server side. I think I know how to do it server side by calling the Page.Validate("groupname") method for each group, but how can it be done client side? 回答1: You should be able to accomplish this by creating a javascript function that uses Page