TextChanged eats up all other events

Discussion in 'ASP .Net Web Controls' started by xcomplus, Feb 21, 2005.

  1. xcomplus

    xcomplus Guest

    Hi,

    I have a page with textboxes, checkboxes, buttons, etc. One of textboxes has
    Autopostback=true. I am using TextChanged event of this textbox to populate
    some other read only textboxes from the DB. If I change the textbox with
    autopostback=true and click on anything else in the page using the mouse,
    e.g., click on other editable textboxes, checkboxes, etc, only the
    TextChenaged event is called. If I click on another textbox I see the edit
    focus in that textboxes temprarily, as soon as the page is posted back from
    the server, the edit focus is gone. If I click on another checkbox, I see the
    checkbox get checked temprarily, as soon as the page is posted back from the
    server, the check on that checkbox is gone. Can anybody tell me how to
    overcome this problem?

    Thanks.
    any of the buttons all events fire as expected Page_Load,
    TextChanged, Button.Click. However if textbox is not empty (already
    contains some text) and I just change this text and click on the button
    I get only Page_Load and Textchanged fired, no Button.Click event.
    Does anyone knows what is the problem and how to workaround it?


    Thanks.
     
    xcomplus, Feb 21, 2005
    #1
    1. Advertising

  2. xcomplus

    xcomplus Guest

    I am posting the previous message again, since the original one I posted has
    some extra text that is not related to this case.

    Hi,

    I have a page with textboxes, checkboxes, buttons, etc. One of textboxes has
    Autopostback=true. I am using TextChanged event of this textbox to populate
    some other read only textboxes from the DB. If I change the textbox with
    topostback=true and click on anything else in the page using the mouse, e.g.,
    click on other editable textboxes, checkboxes, etc, only the TextChenaged
    event is called. If I click on another textbox I see the edit focus in that
    textboxes temprarily, as soon as the page is posted back from the server, the
    edit focus is gone. If I click on another checkbox, I see the checkbox get
    checked temprarily, as soon as the page is posted back from the server, the
    check on that checkbox is gone. Can anybody tell me how to overcome this
    problem?

    Thanks.
     
    xcomplus, Feb 21, 2005
    #2
    1. Advertising

  3. xcomplus

    Leo Guest

    Here's my best guess:

    You enter text in the autopostback textbox. You then click another
    checkbox. As soon as the autopostback textbox looses focus the page is
    posted back to the server. This happens before the checkbox is checked so
    the checking of the checkbox is not in the viewstate data for the posted
    back page. While the round trip is occuring to the server and back to you,
    your browser is correctly rendering the checking of the checkbox on your
    local system. Now you get the data back from the postback to the server,
    but the server never saw the checkbox checked, so it is missing on the
    response the server sends to you. It's just a matter of the timing of
    events.

    "xcomplus" <> wrote in message
    news:...
    >I am posting the previous message again, since the original one I posted
    >has
    > some extra text that is not related to this case.
    >
    > Hi,
    >
    > I have a page with textboxes, checkboxes, buttons, etc. One of textboxes
    > has
    > Autopostback=true. I am using TextChanged event of this textbox to
    > populate
    > some other read only textboxes from the DB. If I change the textbox with
    > topostback=true and click on anything else in the page using the mouse,
    > e.g.,
    > click on other editable textboxes, checkboxes, etc, only the TextChenaged
    > event is called. If I click on another textbox I see the edit focus in
    > that
    > textboxes temprarily, as soon as the page is posted back from the server,
    > the
    > edit focus is gone. If I click on another checkbox, I see the checkbox get
    > checked temprarily, as soon as the page is posted back from the server,
    > the
    > check on that checkbox is gone. Can anybody tell me how to overcome this
    > problem?
    >
    > Thanks.
     
    Leo, Feb 23, 2005
    #3
    1. Advertising

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.
Similar Threads
  1. Casper Hornstrup

    ASP.NET process eats all CPU time

    Casper Hornstrup, May 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    455
    Steven Cheng[MSFT]
    May 13, 2004
  2. =?Utf-8?B?Sm9yZ2UgUmliZWlybw==?=

    HTTP handler eats all up

    =?Utf-8?B?Sm9yZ2UgUmliZWlybw==?=, Aug 17, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    325
    =?Utf-8?B?Sm9yZ2UgUmliZWlybw==?=
    Aug 17, 2004
  3. PromisedOyster
    Replies:
    1
    Views:
    362
    bgano
    Nov 15, 2006
  4. Quickstone

    TextChanged eats up Button Click event problem

    Quickstone, Sep 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    923
    Israel
    Sep 22, 2004
  5. Iñaki Baz Castillo
    Replies:
    5
    Views:
    122
    Marcelo
    Mar 27, 2008
Loading...

Share This Page