POST vs GET on data display forms

M

murphy

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
 
S

Steven Cheng[MSFT]

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.)
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top