How to achieve this

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Sep 7, 2006.

  1. Hi,
    After a use enters his creditcard info and clicks to place an order, how can
    I expire the page if he clicks the "Back" button?

    Thanks
     
    =?Utf-8?B?Q2hyaXM=?=, Sep 7, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXM=?=

    Tim_Mac Guest

    you can use all sorts of meta tags on the page but none of them are a rock
    solid solution. i don't honestly think there is a reliable way to prevent
    the user clicking back. although you can figure out if they are re-posting
    a form.

    you can put in this javascript code to make sure that an attampt to go back
    is never successful, provided the user has javascript enabled.

    history.forward();

    if there is a forward item in the history, it will go there immediately. to
    put it another way, if someone clicks back then the above code should boot
    them forward. i think this should prevent re-posts of the form.

    some banking web sites use form submit buttons on the entire site, no
    hyperlinks anywhere, and they can then do a server-side check on every page
    and if there is a re-post then it is picked up and they get automatically
    logged off. this is a very harsh approach but as a user you quickly learn
    to avoid using the back button. not sure if this would suit your target
    users who may be one-off visitors.

    hope this helps
    tim


    "Chris" <> wrote in message
    news:...
    > Hi,
    > After a use enters his creditcard info and clicks to place an order, how
    > can
    > I expire the page if he clicks the "Back" button?
    >
    > Thanks
    >
     
    Tim_Mac, Sep 8, 2006
    #2
    1. Advertising

  3. how should i trap report? Use Page.IsPostBack?

    "Tim_Mac" wrote:

    > you can use all sorts of meta tags on the page but none of them are a rock
    > solid solution. i don't honestly think there is a reliable way to prevent
    > the user clicking back. although you can figure out if they are re-posting
    > a form.
    >
    > you can put in this javascript code to make sure that an attampt to go back
    > is never successful, provided the user has javascript enabled.
    >
    > history.forward();
    >
    > if there is a forward item in the history, it will go there immediately. to
    > put it another way, if someone clicks back then the above code should boot
    > them forward. i think this should prevent re-posts of the form.
    >
    > some banking web sites use form submit buttons on the entire site, no
    > hyperlinks anywhere, and they can then do a server-side check on every page
    > and if there is a re-post then it is picked up and they get automatically
    > logged off. this is a very harsh approach but as a user you quickly learn
    > to avoid using the back button. not sure if this would suit your target
    > users who may be one-off visitors.
    >
    > hope this helps
    > tim
    >
    >
    > "Chris" <> wrote in message
    > news:...
    > > Hi,
    > > After a use enters his creditcard info and clicks to place an order, how
    > > can
    > > I expire the page if he clicks the "Back" button?
    > >
    > > Thanks
    > >

    >
    >
    >
     
    =?Utf-8?B?Q2hyaXM=?=, Sep 9, 2006
    #3
    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. J
    Replies:
    1
    Views:
    294
    Kevin Spencer
    Aug 20, 2003
  2. Eric
    Replies:
    4
    Views:
    2,649
  3. Wee Bubba

    Can I achieve this with a Repeater?

    Wee Bubba, May 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    285
    Wee Bubba
    May 18, 2004
  4. Rich
    Replies:
    5
    Views:
    3,950
    Karl Seguin [MVP]
    Feb 22, 2006
  5. hangar18
    Replies:
    2
    Views:
    391
    Bruce Barker
    Mar 14, 2006
Loading...

Share This Page