[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Can I get notification of a textfield's contents' change event?

Using C#, I'd like to get the event which fires when a textfield's text changes.  For example,
if the text in the field is "12", but, while the value is selected, I type "9" to overwrite the entire the "12".  Isn't there an event which fires at that moment?  If so, I'd love to hear what it is and how to get notified of this event firing.


Thanks,
Bob
0
ba272
Asked:
ba272
  • 4
  • 2
1 Solution
 
ba272Author Commented:
I followed both links, but can't figure out how to associate the code with a particular textfield.  Normally, it seems like the name of the control gets inserted before the event type.

For example, I have a button called "newBtn".  And when I double click on the button, in Designer mode, an event is created called the "newBtn_Click" event.  But how do I associate the OnTextChanged event with the actual control who's text I'm trying to assess?  Do I need to create a new object which inherits from TextField?


Thanks,
Bob
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
tusharashahCommented:
Double click on your TextBox and you'll see OnTextChanged event...

in addition to that you also need to set AutoPostBack=true for TextBox from design view.

-tushar
0
 
Rodney HelsensCommented:
From design view...You could right click on the textbox, and select properties, then select the little lightning bolt (events) in the properties window (on the right hand side), clicking on this will create your method.

0
 
Rodney HelsensCommented:
There is a concept of split points here @ ee, this would be an ideal situation to have used it, IMO

just sayin' is all

0
 
ba272Author Commented:
Sorry.  I didn't know that was possible.  I'll do that from now on.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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