Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > POST vs GET on data display forms

Reply
Thread Tools

POST vs GET on data display forms

 
 
murphy@murphysw.com
Guest
Posts: n/a
 
      02-22-2005
Hello,

I've run into a potentially wrong design decision on a project and want
to find out if my intended change is the best fix.

I have a page that displays historical time-series data using a
datagrid. The browser can modify the timeframe displayed by selecting
a value from a dropdown list of 1 day, 1 week, 1 month or previous
months.

The dropdown causes a postback that has the server requerying the
database for the new set of data.

The problem arises when the user looks at several timeframes
sequentially via the dropdown, and then uses the back button on the
browser. The browser renders the previous page from cache but the
selected item on the dropdown does not match the timeframe displayed by
the datagrid.

I tried using SmartNavigation, but pages just came up blank when using
the back button. I noted that newgroup buzz on SmartNavigation is that
it's problematic and I was unable to find a detailed list of gotchas to
beware. So I passed on that option.

I'm thinking instead to reimplement the page (and others like it) to
handle changes in timeframe with a GET submit action instead, passing
along the timeframe and other criteria in the querystring. This will
allow the the browser caching to work properly I believe.

Is using GET for display of data and POST for changing a pretty good
rule of thumb? Should I not give up on SmartNavigation option?

Thanks for your opinions!

Mark

 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-01-2005
Hi Mark,

Welcome to ASPNET newsgroup. Yes, the problem you're encoutering is infact
a problem of the <select> html element with IE, when we hit the "back"
button in browser , the <select> browser's state will always be one step
delay. I also haven't found any means to avoid this. As for the
"SmartNavigation" , this will help us remove the page's postback request
from the clientbrower's history list so that users can't return back to the
pervious page view through the browser's back button( We can also do this
through expiring the page).

So currently, instead of disabling the page's history list of postbacks(
smartnaviagtion), I also think using Get Request maybe a better approach
you can consider.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: display page, post back, display again =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= ASP .Net 1 07-14-2006 11:23 AM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Can I have GET and POST forms on the same page? Alan Silver ASP .Net 9 02-01-2005 06:34 PM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM
ASP, FORMS, POST METHOD And Post with out form(???) Don Glover the younger ASP General 0 07-13-2003 02:47 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57