Getting TextChanged Event to fire from a ToolbarTextbox

I

Itchy & Scratchy

Hello,

I am having a problem getting a textchanged event to fire on a
toolbartextbox control.

Below is the code from the ascx

<ie:ToolBar id="objToolbar" autopostback="True" runat="server" />

All the ToolbarItems are added dynamically in the Page_Load event of the
ascx.vb file. I run though a loop which contains the code below.

Dim NewTextBox As New Microsoft.Web.UI.WebControls.ToolbarTextBox()
NewTextBox.Text = lsName
NewTextBox.ID = lsID
NewTextBox.MaxLength = liMaxLength
NewTextBox.AutoPostBack = True
objToolbar.Items.Add(NewTextBox)
AddHandler NewTextBox.TextChanged, AddressOf SearchTextboxChanged

The code compiles and runs fine, however when I change the text in the text
boxes and change focus, the form appears to submit but despite putting
breakpoints in both the Page_Load and SearchTextboxChanged subroutines
neither are hit?

Am I missing something or just being stupid. If the later please be kind!?

I saw another post, that related to someone asking how they could respond to
the return key being pressed in the textbox, as though the search button
next to it had been pressed. This is basically what I am trying to achieve,
but I can't seem to get any control over the return key being pressed or
text changing in the toolbartextbox, so I'm stuck.

Thanks for your help.
 

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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top