• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

Is it possible to disable events for a control temporarily?

I have a problem. I have 2 textbox controls each firring an event when the text is changed which changes the text in the other textbox. While I can make it work without getting into an infinite loop it causes a lot of problems. Is it possible to disable events for a control temporarily?
0
Suppai
Asked:
Suppai
  • 2
1 Solution
 
jpaulinoCommented:
You can use RemoveHandler to remove events.
0
 
SuppaiAuthor Commented:
How exactly do I do that?
0
 
jpaulinoCommented:
Check this example
http://msdn.microsoft.com/en-us/library/3xz97kac.aspx
You can addhandler to control and then remove it when necessary
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now