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.
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.