trick for server-side execution without reloading page?

Discussion in 'ASP .Net' started by PJ6, Dec 5, 2005.

  1. PJ6

    PJ6 Guest

    After resigning myself to really learn JavaScript, I finally made my own
    grid control that populates itself and updates data . It's actually pretty
    sweet. The only problem I have with it is that every edit posts back, and
    when that happens, the browser accumulates a history of old page states that
    are no longer valid. I read some about the "Redirect After Post pattern" but
    can only find articles that explain it in terms of Struts. Maybe someone
    could explain to me how it would work in ASP.NET?

    I also had the idea that I could have the edit updating action open a new
    window, have that POST to execute server-side code, and then close. No
    history accumulation. Only that's kind of ugly considering many users have
    popup blockers and having a window pop up, however briefly, for each edit
    would probably be pretty annoying.

    So what's the best way to approach this?

    Thanks in advance to anyone who can help,
    Paul
     
    PJ6, Dec 5, 2005
    #1
    1. Advertising

  2. PJ6

    Spam Catcher Guest

    "PJ6" <> wrote in
    news:#8gMvqa#:

    > After resigning myself to really learn JavaScript, I finally made my
    > own grid control that populates itself and updates data . It's
    > actually pretty sweet. The only problem I have with it is that every
    > edit posts back, and when that happens, the browser accumulates a
    > history of old page states that are no longer valid. I read some about
    > the "Redirect After Post pattern" but can only find articles that
    > explain it in terms of Struts. Maybe someone could explain to me how
    > it would work in ASP.NET?
    >
    > I also had the idea that I could have the edit updating action open a
    > new window, have that POST to execute server-side code, and then
    > close. No history accumulation. Only that's kind of ugly considering
    > many users have popup blockers and having a window pop up, however
    > briefly, for each edit would probably be pretty annoying.
    >
    > So what's the best way to approach this?



    Take a look at AJAX and Client Side Postbacks - these technologies will
    allow you to postback data (and retrieve data) without reloading a webpage.



    --
    Stan Kee ()
     
    Spam Catcher, Dec 5, 2005
    #2
    1. Advertising

  3. PJ6

    Remy Guest

    I'm not 100% sure but I think the new Grid Control in ASP.NET 2.0 does
    that already. Otherwise try out Ajax, which is the hype of the moment
    to do async callbacks without actual page reloads. Microsoft has an
    Ajax implementation called Atlas, but if you google for Ajax and .NET
    you should find tons of stuff.

    Remy Blaettler
    www.collaboral.com
     
    Remy, Dec 5, 2005
    #3
  4. PJ6

    Patrice Guest

    Another option would be perhaps to prevent cahing ?
    http://support.microsoft.com/kb/234067/en-us

    --

    "PJ6" <> a écrit dans le message de
    news:%238gMvqa%...
    > After resigning myself to really learn JavaScript, I finally made my own
    > grid control that populates itself and updates data . It's actually pretty
    > sweet. The only problem I have with it is that every edit posts back, and
    > when that happens, the browser accumulates a history of old page states

    that
    > are no longer valid. I read some about the "Redirect After Post pattern"

    but
    > can only find articles that explain it in terms of Struts. Maybe someone
    > could explain to me how it would work in ASP.NET?
    >
    > I also had the idea that I could have the edit updating action open a new
    > window, have that POST to execute server-side code, and then close. No
    > history accumulation. Only that's kind of ugly considering many users have
    > popup blockers and having a window pop up, however briefly, for each edit
    > would probably be pretty annoying.
    >
    > So what's the best way to approach this?
    >
    > Thanks in advance to anyone who can help,
    > Paul
    >
    >
     
    Patrice, Dec 5, 2005
    #4
  5. PJ6

    PJ6 Guest

    "Spam Catcher" <> wrote in message
    news:Xns97236433FDB8Eusenethoneypotrogers@127.0.0.1...
    > Take a look at AJAX and Client Side Postbacks - these technologies will
    > allow you to postback data (and retrieve data) without reloading a
    > webpage.


    Great suggestion! I got it working for a simple case but I'm having a
    problem with response.value being always null in the project I care about...
    I'll get it eventually I hope.

    Thanks,
    Paul
     
    PJ6, Dec 5, 2005
    #5
  6. PJ6

    PJ6 Guest

    w00t I got it my class was abstact and I had to make the server-side method
    static.

    :)

    Paul

    "PJ6" <> wrote in message
    news:%23tGJSzb%...
    > "Spam Catcher" <> wrote in message
    > news:Xns97236433FDB8Eusenethoneypotrogers@127.0.0.1...
    >> Take a look at AJAX and Client Side Postbacks - these technologies will
    >> allow you to postback data (and retrieve data) without reloading a
    >> webpage.

    >
    > Great suggestion! I got it working for a simple case but I'm having a
    > problem with response.value being always null in the project I care
    > about... I'll get it eventually I hope.
    >
    > Thanks,
    > Paul
    >
     
    PJ6, Dec 5, 2005
    #6
  7. How does preventing caching eliminate a POST

    --
    Regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    The Microsoft Office Web Components Black Book with .NET
    Now Available @ www.lulu.com/owc
    Forth-coming VSTO.NET - Wrox/Wiley 2006
    -------------------------------------------------------



    "Patrice" <> wrote in message
    news:O1SUk1a#...
    > Another option would be perhaps to prevent cahing ?
    > http://support.microsoft.com/kb/234067/en-us
    >
    > --
    >
    > "PJ6" <> a écrit dans le message de
    > news:%238gMvqa%...
    > > After resigning myself to really learn JavaScript, I finally made my own
    > > grid control that populates itself and updates data . It's actually

    pretty
    > > sweet. The only problem I have with it is that every edit posts back,

    and
    > > when that happens, the browser accumulates a history of old page states

    > that
    > > are no longer valid. I read some about the "Redirect After Post pattern"

    > but
    > > can only find articles that explain it in terms of Struts. Maybe someone
    > > could explain to me how it would work in ASP.NET?
    > >
    > > I also had the idea that I could have the edit updating action open a

    new
    > > window, have that POST to execute server-side code, and then close. No
    > > history accumulation. Only that's kind of ugly considering many users

    have
    > > popup blockers and having a window pop up, however briefly, for each

    edit
    > > would probably be pretty annoying.
    > >
    > > So what's the best way to approach this?
    > >
    > > Thanks in advance to anyone who can help,
    > > Paul
    > >
    > >

    >
    >
     
    Alvin Bruney - ASP.NET MVP, Dec 5, 2005
    #7
  8. PJ6

    Patrice Guest

    It won't but my understanding is that the real problem is :

    >> the browser accumulates a history of old page states that are no longer

    valid.

    He then came with not posting as a way to solve this but it's not clear if
    he tried some other path before...

    --
    Patrice

    "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> a écrit dans le message de
    news:ugPaPDc%...
    > How does preventing caching eliminate a POST
    >
    > --
    > Regards,
    > Alvin Bruney [MVP ASP.NET]
    >
    > [Shameless Author plug]
    > The Microsoft Office Web Components Black Book with .NET
    > Now Available @ www.lulu.com/owc
    > Forth-coming VSTO.NET - Wrox/Wiley 2006
    > -------------------------------------------------------
    >
    >
    >
    > "Patrice" <> wrote in message
    > news:O1SUk1a#...
    > > Another option would be perhaps to prevent cahing ?
    > > http://support.microsoft.com/kb/234067/en-us
    > >
    > > --
    > >
    > > "PJ6" <> a écrit dans le message de
    > > news:%238gMvqa%...
    > > > After resigning myself to really learn JavaScript, I finally made my

    own
    > > > grid control that populates itself and updates data . It's actually

    > pretty
    > > > sweet. The only problem I have with it is that every edit posts back,

    > and
    > > > when that happens, the browser accumulates a history of old page

    states
    > > that
    > > > are no longer valid. I read some about the "Redirect After Post

    pattern"
    > > but
    > > > can only find articles that explain it in terms of Struts. Maybe

    someone
    > > > could explain to me how it would work in ASP.NET?
    > > >
    > > > I also had the idea that I could have the edit updating action open a

    > new
    > > > window, have that POST to execute server-side code, and then close. No
    > > > history accumulation. Only that's kind of ugly considering many users

    > have
    > > > popup blockers and having a window pop up, however briefly, for each

    > edit
    > > > would probably be pretty annoying.
    > > >
    > > > So what's the best way to approach this?
    > > >
    > > > Thanks in advance to anyone who can help,
    > > > Paul
    > > >
    > > >

    > >
    > >

    >
    >
     
    Patrice, Dec 5, 2005
    #8
  9. ok

    --
    Regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    The Microsoft Office Web Components Black Book with .NET
    Now Available @ www.lulu.com/owc
    Forth-coming VSTO.NET - Wrox/Wiley 2006
    -------------------------------------------------------



    "Patrice" <> wrote in message
    news:OUm8Bhc#...
    > It won't but my understanding is that the real problem is :
    >
    > >> the browser accumulates a history of old page states that are no longer

    > valid.
    >
    > He then came with not posting as a way to solve this but it's not clear if
    > he tried some other path before...
    >
    > --
    > Patrice
    >
    > "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> a écrit dans le message de
    > news:ugPaPDc%...
    > > How does preventing caching eliminate a POST
    > >
    > > --
    > > Regards,
    > > Alvin Bruney [MVP ASP.NET]
    > >
    > > [Shameless Author plug]
    > > The Microsoft Office Web Components Black Book with .NET
    > > Now Available @ www.lulu.com/owc
    > > Forth-coming VSTO.NET - Wrox/Wiley 2006
    > > -------------------------------------------------------
    > >
    > >
    > >
    > > "Patrice" <> wrote in message
    > > news:O1SUk1a#...
    > > > Another option would be perhaps to prevent cahing ?
    > > > http://support.microsoft.com/kb/234067/en-us
    > > >
    > > > --
    > > >
    > > > "PJ6" <> a écrit dans le message de
    > > > news:%238gMvqa%...
    > > > > After resigning myself to really learn JavaScript, I finally made my

    > own
    > > > > grid control that populates itself and updates data . It's actually

    > > pretty
    > > > > sweet. The only problem I have with it is that every edit posts

    back,
    > > and
    > > > > when that happens, the browser accumulates a history of old page

    > states
    > > > that
    > > > > are no longer valid. I read some about the "Redirect After Post

    > pattern"
    > > > but
    > > > > can only find articles that explain it in terms of Struts. Maybe

    > someone
    > > > > could explain to me how it would work in ASP.NET?
    > > > >
    > > > > I also had the idea that I could have the edit updating action open

    a
    > > new
    > > > > window, have that POST to execute server-side code, and then close.

    No
    > > > > history accumulation. Only that's kind of ugly considering many

    users
    > > have
    > > > > popup blockers and having a window pop up, however briefly, for each

    > > edit
    > > > > would probably be pretty annoying.
    > > > >
    > > > > So what's the best way to approach this?
    > > > >
    > > > > Thanks in advance to anyone who can help,
    > > > > Paul
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alvin Bruney - ASP.NET MVP, Dec 6, 2005
    #9
    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. Urs Vogel
    Replies:
    2
    Views:
    2,427
    Urs Vogel
    Jun 10, 2004
  2. Richard
    Replies:
    3
    Views:
    553
    Richard
    Jul 22, 2004
  3. Daylor
    Replies:
    1
    Views:
    463
    Saravana
    Nov 22, 2004
  4. HP
    Replies:
    4
    Views:
    613
  5. Stimp
    Replies:
    1
    Views:
    11,175
    Karl Seguin
    Oct 10, 2005
Loading...

Share This Page