trick for server-side execution without reloading page?

P

PJ6

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
 
G

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?


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

Remy

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
 
P

PJ6

Spam Catcher said:
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
 
P

PJ6

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

:)

Paul
 
A

Alvin Bruney - ASP.NET MVP

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
 
P

Patrice

It won't but my understanding is that the real problem is :
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 said:
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 said:
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

states
that pattern"
but
 
A

Alvin Bruney - ASP.NET MVP

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 said:
It won't but my understanding is that the real problem is :
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 said:
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 said:
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

"PJ6" <[email protected]> a écrit dans le message de
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top