Home » 2012 » September » 17

Archive for September 17, 2012

ASP.NET Validator – validate one of the two values

Validate one of the two textbox values Markup page Please enter on of at least one contact point: <asp:CustomValidator ID=”ContactInfoAlert” runat=”server” ErrorMessage=”CustomValidator” OnServerValidate=”CustomValidator_ServerValidate”> </asp:CustomValidator> User email: <asp:TextBox ID=”EmailTbx” runat=”server” ToolTip=”Enter email.” > </asp:TextBox> User phone: <asp:TextBox ID=”PhoneTbx” runat=”server” ToolTip=”Enter phone number.” > </asp:TextBox> <asp:Button ID=”Btn1″ runat=”server” Text=”Next” CausesValidation=”true”/> Click to read more… Code-behind page Protected […]