Bubbling the TextBox.TextChanged event to a parent Repeater control?

Z

Zoe Hart

Does anyone know how to bubble a TextBox.TextChanged event up to the
container Repeater control. By default the Repeater control handles
CommandEvents from button controls. I want to figure out how to do the same
kind of thing but with the TextChanged event. The reading I've done says
that any control can bubble events, but the examples seem to assume you're
building your own control. I want to bubble and existing event, TextChanged,
from an existing control, TextBox, and handle it within an existing
container, Repeater. Any pointers?

Thanks,
Zoe
 
C

Craig Deelsnyder

Zoe said:
Does anyone know how to bubble a TextBox.TextChanged event up to the
container Repeater control. By default the Repeater control handles
CommandEvents from button controls. I want to figure out how to do the same
kind of thing but with the TextChanged event. The reading I've done says
that any control can bubble events, but the examples seem to assume you're
building your own control. I want to bubble and existing event, TextChanged,
from an existing control, TextBox, and handle it within an existing
container, Repeater. Any pointers?

Thanks,
Zoe

I believe in the ItemCreated event of your repeater, add an event
handler pointing to a local function that is hooked to the
TextBox.TextChanged. You'll need to do a FindControl in the e.Item to
get a reference to the textbox....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top