MVP is this a BUG? Adding button element corrupts textbox event!!!

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default MVP is this a BUG? Adding button element corrupts textbox event!!!

    Hi, I posted earlier about my textbox textchanged event no longer
    firing. I've found the cause but NOT the reason.

    On a fairly simple aspx form, I added an html button to fire a
    client-side script of open.window. As soon as this was added, the
    textchanged of my textbox no longer fires. I checked that the Handles
    part of the sub statement is still there.

    EVEN WHEN I DELETE THE NEW BUTTON, the problem remains. I see no code
    changes but must revert to a backup to restore the event.

    PLEASE HELP...this is serious problem for me.

    Thanks.

    Kathy

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

  2. Similar Questions and Discussions

    1. adding click event to dynamically created button
      Hi i have created a button using createObject and want to add click event and on click event want to call a function but its not working. The...
    2. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    3. Access the FooterTemplates TextBox control on the Button Click Event
      Hello, I have the following code in the .aspx file <asp:TemplateColumn HeaderText="&#160;FG Name"> <HeaderStyle ForeColor="White"></HeaderStyle>...
    4. Adding attributes to xml root element.
      Namaskara! Can anybody suggest a simple way to add or remove an attribute to the root element in an xml file ?
    5. VERY STRANGE BUG? Adding a textbox control causes other textbox control to fail???
      I've had this happen a few times too. I'm still not positive of what exactly causes it but all that's happening is the control that no longer...
  3. #2

    Default MVP is this a BUG? Adding button element corrupts textbox event!!!

    Hi

    Use the AutoPostBack property to specify whether an
    automatic postback to the server will occur whenever the
    user modifies the text in the TextBox control and then
    tabs out of the control.

    Note:Postback only occurs when the text box loses focus
    after the contents are changed.

    HTH
    Ravikanth

    >-----Original Message-----
    >Hi, I posted earlier about my textbox textchanged event
    no longer
    >firing. I've found the cause but NOT the reason.
    >
    >On a fairly simple aspx form, I added an html button to
    fire a
    >client-side script of open.window. As soon as this was
    added, the
    >textchanged of my textbox no longer fires. I checked
    that the Handles
    >part of the sub statement is still there.
    >
    >EVEN WHEN I DELETE THE NEW BUTTON, the problem remains.
    I see no code
    >changes but must revert to a backup to restore the event.
    >
    >PLEASE HELP...this is serious problem for me.
    >
    >Thanks.
    >
    >Kathy
    >
    >*** Sent via Developersdex [url]http://www.developersdex.com[/url]
    ***
    >Don't just participate in USENET...get rewarded for it!
    >.
    >
    Ravikanth[MVP] Guest

  4. #3

    Default Re: MVP is this a BUG? Adding button element corrupts textbox event!!!

    Thanks for responding...but the autopostback isn't the problem. The
    textbox event worked FINE (fired on user hitting <Enter>) until I added
    a button control and set the onclick to be an open.window script. I
    still need an answer...help!

    Kathy

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

  5. #4

    Default Re: MVP is this a BUG? Adding button element corrupts textbox event!!!

    After several hours of hair pulling, finally got it working. It was a
    combination of things. It would only work if I did NOT use an inline
    script in the html button. In the end, for those new users who may have
    a similar problem, I did the following:

    (1) Added the onclick script in the <head> of the html.

    (2) Used an asp:button (vs. html) and put the following code in the page
    load sub (if not postback):

    buttonname.attributes.add("onclick", "name_of_script();return false;")

    the return false will remove/disable the "submit" function that asp.net
    adds in runtime.

    Kathy

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139