POST vs GET on data display forms

Discussion in 'ASP .Net' started by murphy@murphysw.com, Feb 22, 2005.

  1. Guest

    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
     
    , Feb 22, 2005
    #1
    1. Advertising

  2. 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.)
     
    Steven Cheng[MSFT], Mar 1, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Silver
    Replies:
    9
    Views:
    564
    Alan Silver
    Feb 1, 2005
  2. =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=

    How to: display page, post back, display again

    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Jul 14, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,039
    Walter Wang [MSFT]
    Jul 14, 2006
  3. arnuld
    Replies:
    6
    Views:
    640
    arnuld
    Sep 5, 2007
  4. Eric
    Replies:
    2
    Views:
    605
  5. Don Glover the younger

    ASP, FORMS, POST METHOD And Post with out form(???)

    Don Glover the younger, Jul 13, 2003, in forum: ASP General
    Replies:
    0
    Views:
    499
    Don Glover the younger
    Jul 13, 2003
Loading...

Share This Page