I am working on a donations website. The particular web page works by allowing the user to enter a monetary value in a textbox and clicking on the button ‘Donate Now’ to perform the transaction.
What I would like to do is to bring up a pop-up window with an error message if the user enters an invalid value in the textbox. How can this be done?
Have you looked at the
asp:RequiredFieldValidator,asp:RegularExpressionValidatorandasp:ValidationSummaryfeatures that asp.net provides?Edit
Here is an example of a textbox which is only allowed to containt values on the form “xx-0000” (two letters, a ‘-‘, and then four digits). This is ensured by the
RegularExpressionValidatorand theValidationSummaryshows an popup with the error message if the textbox not containts a valid value.