Getting TextChanged Event to fire from a ToolbarTextbox

Discussion in 'ASP .Net Web Controls' started by Itchy & Scratchy, Jul 21, 2003.

  1. 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
    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.
    Itchy & Scratchy, Jul 21, 2003
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.