Validating Event Firing at Design Time????

  • Thread starter Thread starter John Saunders
  • Start date Start date
J

John Saunders

I'm adding a bunch of Validating events to my form, and find that the
Validating event of a TextBox is firing. This particular TextBox is within a
tab page, if that matters at all.

How do I either prevent this event from firing, or else how should my code
detect that it's design time? TextBox.Site is null, so I can't check
TextBox.Site.DesignMode.

This is VS2003, .NET 1.1 without SP1.
 
Hi John,

AFAIK TextBox's Site shouldn't be null unless you create it dynamically.
There are property DesignMoode, but it is also based on the conponent's
site. You can try to check text box parent sites or even the form site
property
 
Back
Top