ICallbackEventHandler

Discussion in 'ASP .Net Web Controls' started by Ben Schumacher, Aug 24, 2006.

  1. I have a page that implements ICallbackEventHandler. I'm trying to
    accomplish auto saving a page everytime the user navigates away from the
    page. To initialize the callback, I fire the onunload event on the window
    as can be seen below.

    <script type="text/javascript">

    window.onunload = Save;

    function Save()
    {
    CallServer()
    }

    </script>

    This works great as I can see in my Page_Load event that the Page.IsCallBack
    property becomes true. Now here is where I am stuck. My RaiseCallBack
    event fires just as it should, but when i try to read the ".text" values of
    all my textbox controls on the form I get whatever was in the previous
    viewstate. Not what i typed/changed the textbox to just before the
    callback. Whats even more weird is that when the page comes back to the
    client after re-rendering it self i can see my changed text box value. So i
    fire the callback again, and still i can't read the current value out of the
    textbox control. It's like the ICallBackEventHandler interface doesn't keep
    track of the changes on the form. It just gives me whatever that last
    viewstate values that were generated from a full page POSTBACK not CALLBACK.

    Any suggestions?

    Thanks,

    Ben
     
    Ben Schumacher, Aug 24, 2006
    #1
    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. begemot

    ICallbackEventHandler and Mozilla

    begemot, Jun 21, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,241
    begemot
    Jun 22, 2005
  2. JimGreen

    ICallbackEventHandler Q????

    JimGreen, Oct 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    420
  3. Maya Nasri

    ASP.NET 2 ICallbackEventHandler

    Maya Nasri, Nov 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,018
  4. Lorenzo Soncini

    ASP.NET 2.0 ICallbackEventHandler

    Lorenzo Soncini, Dec 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,771
    Lorenzo Soncini
    Dec 28, 2005
  5. Edwin Knoppert
    Replies:
    0
    Views:
    410
    Edwin Knoppert
    Jan 19, 2006
Loading...

Share This Page