473,564 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1610
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******** **********@TK2M SFTNGP14.phx.gb l...
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**********@r ogers.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******** **********@TK2M SFTNGP12.phx.gb l...
"Spam Catcher" <sp**********@r ogers.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******** ******@TK2MSFTN GP10.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******** **********@TK2M SFTNGP14.phx.gb l...
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******** ********@TK2MSF TNGP09.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******** ******@TK2MSFTN GP10.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******** **********@TK2M SFTNGP14.phx.gb l...
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******** ******@TK2MSFTN GP10.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******** ********@TK2MSF TNGP09.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******** ******@TK2MSFTN GP10.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******** **********@TK2M SFTNGP14.phx.gb l...
> 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
1701
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
2874
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 only issue is when s does not contain the character '=', let's say it is 'xyz', the result list has a len of 1 and the unpacking would fail. Is there...
6
2231
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'" trick looks handy. Does Python have a similar trick? Or, is there a shorter Python recipe for the given problem?
134
6009
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 different from C. I'm curious -- what is everyone's favorite trick from a non-python language? And -- why isn't it in Python? Here's my...
4
1500
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 162.136.133.36#http://162.136.133.36# The code to display the field is below response.write "<TD WIDTH=200>" & vbcrlf
2
4594
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
1574
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: _________________________________________________________________________________________________________ Imports System.ComponentModel Imports System.Web.UI Imports...
4
1232
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 control freezes too. What I need is to spawn a thread and put controls main thread in this thread. Is it possible? Thanks, Boni
5
4165
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 optimizations tricks? I would like to be aware of all tips and trick that should be used as good programming habits that make any software coding...
3
1571
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 .... data1 data2 data2 data4.... to col1: data1
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.