473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

trick for server-side execution without reloading page?

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
Dec 5 '05 #1
7 1596
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

Dec 5 '05 #2
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

"PJ6" <no****@nowhere.net> a écrit dans le message de
news:%2******************@TK2MSFTNGP14.phx.gbl...
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

Dec 5 '05 #3
PJ6
"Spam Catcher" <sp**********@rogers.com> wrote in message
news:Xn**********************************@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
Dec 5 '05 #4
PJ6
w00t I got it my class was abstact and I had to make the server-side method
static.

:)

Paul

"PJ6" <no****@nowhere.net> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
"Spam Catcher" <sp**********@rogers.com> wrote in message
news:Xn**********************************@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

Dec 5 '05 #5
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" <no****@nowhere.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

"PJ6" <no****@nowhere.net> a écrit dans le message de
news:%2******************@TK2MSFTNGP14.phx.gbl...
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


Dec 5 '05 #6
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:ug****************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

"PJ6" <no****@nowhere.net> a écrit dans le message de
news:%2******************@TK2MSFTNGP14.phx.gbl...
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



Dec 5 '05 #7
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" <no****@nowhere.com> wrote in message
news:OU**************@TK2MSFTNGP10.phx.gbl...
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:ug****************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Another option would be perhaps to prevent cahing ?
http://support.microsoft.com/kb/234067/en-us

--

"PJ6" <no****@nowhere.net> a écrit dans le message de
news:%2******************@TK2MSFTNGP14.phx.gbl...
> 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
>
>



Dec 6 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Dan | last post by:
Is there a python equivalent of this trick in C? Logic_Test ? True_Result : False_Result Example: printf( "you have %i %s", num_eggs, num_eggs > 1 ? "eggs" : "egg" );
6
by: aurora | last post by:
I find that I use some list unpacking construct very often: name, value = s.split('=',1) So that 'a=1' unpack as name='a' and value='1' and 'a=b=c' unpack as name='a' and value='b=c'. The...
6
by: Wonjae Lee | last post by:
I read the comment of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277753. (Title : Find and replace string in all files in a directory) "perl -p -i -e 's/change this/..to this/g'"...
134
by: Joseph Garvin | last post by:
As someone who learned C first, when I came to Python everytime I read about a new feature it was like, "Whoa! I can do that?!" Slicing, dir(), getattr/setattr, the % operator, all of this was very...
4
by: Dvan | last post by:
I have a field in my access DB, that is a hyperlink to an IP address. When I display that field on my site using ASP, the link doesn't come across. This is displayed...
2
by: GhislainTanguay | last post by:
This is my XML file and below you will find my code to remove it... I was thinking that it's a simple task but this code doesn't work. Anybody have a better solution? <Advertisements>
5
by: Alex Nitulescu | last post by:
Hi. Because I'm a beginner in creating controls, I spent more than two *&^#$ hours to create this "login" as a custom control and to make it work properly: ...
4
by: Boni | last post by:
Dear all, Is there some trick to put controls on a particular control but in other thread. Example: A control is a part of bigger application and application thread freezes somtimes. So a...
5
by: Marty | last post by:
Hi, I've read that the if/else statement, or get/set accessor, can be compiled inline by the C# compiler if they are small enough. Have you seen any documentation that 'summarized' all thoses...
3
by: GinaMarano | last post by:
I run many queries per day. The results are usually 1 row with many, many columns. Is there a trick/free tool to display this row as 1 column instead? example: col 1 col 2 col 3 col 4...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.