Textbox and onTextChanged Event

P

Paul

Hello:

I create a textbox control programatically something like this:

Dim td As New TableCell()
Dim txtbox As New TextBox()
txtbox.ID = "my_textbox"
td.Controls.Add(txtbox)

Now I want to programatically associate a "OnTextChanged" event to this
textbox.

How can I do this?

When I view the page source, the ID of the textbox control is something like
"ctl00$my_textbox". So the textbox ID actually gets changed.

Can anyone point me to an example or a link that explains how to do this?

TIA.

- Paul
 
B

Balasubramanian Ramanathan

for serverside event associate the TextChanged event

If you want to refer this textbox in the client side use the ClientId
property of the control.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top