Can I tie a validator to two controls at once?



Hello,

I have two dropdown controls on a form, representing a month/year combination. The date entered must be in the future, so I wrote a custom validator to check this. Trouble is, the validator is only tied to one control (currently the month dropdown), which means that the validation isn't fired when the other control's value changes.

Is there a way of getting the client-side validation code to fire when either one of two controls is changed? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
.



Relevant Pages

  • Re: How to disable validator controls clientside when chk box is chked
    ... time as I do the validation controls. ... Thus, when the checkbox's checked status is changed, we can set the> certain validator controls' Enabled property in the checkbox's server event. ... Enables or disables a client validator. ... > Protected WithEvents txtOne As System.Web.UI.WebControls.TextBox> Protected WithEvents rfvOne As ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Check blank text box using custom validator
    ... always and therefore you could validate empty controls as well with it). ... fires once for each attempt to submit. ... > required validator to check for blanks and then ur custom one with what ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Dissapearing Validators
    ... If I add text to a cell after adding controls to it the text 'overwrites' the controls and hence my validators were dissapearing due to the I had added to the cell for formatting reasons. ... > I can see the space I put in the cell which contains the validator and obviously the cell exists ... > RegularExpressionValidator(); ...
    (microsoft.public.dotnet.general)
  • Re: Page validation with multiple panels
    ... got one div as a container and the two inner div's that I set ... > to validate all of your controls server-side. ... > as the controls actually exist in your page, the validator js should ... > the hidden panels in order for the user to see the validation error text. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Custom Composite Control and Validators
    ... validators only list limited number of controls - and webcontrols ... Public Overloads Overrides Function GetStandardValues(ByVal context As ... then you need to define your function (in the same validator override) ... validator doesn't list my custom control under the list of controls to ...
    (microsoft.public.dotnet.framework.aspnet)

Loading