Handling Backs etc.

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2aWQgQ3JvbmU=?=, Apr 5, 2004.

  1. H

    I was wondering if anyone knew what the recommended way is to handle Back clicks, as well as Refresh clicks by users for advanced ASP.NET sites
    I have a site that has a set of information that can be edited on one page, but when a certain action is taken, the user mustn't be able to go back and change details etc!
    Basically, this is an advanced Timesheet application...when someone enters some hours and clicks Submit, then they are allowed to View the timesheet, but cant Add or Edit items. I've effectively blocked all Back requests, but this makes the site very un-user friendly!! I want the site to evaluate certain things, and allow the user to click back, and to redirect to another page or change the State of the page (to View Only from Edit if the person was on Edit mode previously for example)
    I don't mind if the site isn't lightening-quick with the Back requests, as I understand that the page needs to go back to the srever if I want things to be evaluated.
    I'm sure there must be an Accepted Recommended procedure with handling this, but I haven't found it!

    Can anyone help me
    As it stands, I have the following code included in the Form of each page, and it Blocks the back fine, but isn't optimal!

    <
    Response.ExpiresAbsolute = Now(
    Response.Expires =
    Response.CacheControl = "no-cache
    Response.Buffer = Tru
    Response.Cache.SetCacheability(HttpCacheability.NoCache
    Response.Cache.SetExpires (DateTime.UtcNow
    Response.Cache.SetNoStore(
    Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches
    %

    Any advice will be greatly appreciated!

    Thanks in advanc
    David Crone
     
    =?Utf-8?B?RGF2aWQgQ3JvbmU=?=, Apr 5, 2004
    #1
    1. Advertising

  2. I would just put something in either a cookie or the session saying that it
    was there, and if that exists, redirect before the page is displayed....

    James Hancock

    "David Crone" <> wrote in message
    news:...
    > Hi
    >
    > I was wondering if anyone knew what the recommended way is to handle Back
    > clicks, as well as Refresh clicks by users for advanced ASP.NET sites?
    > I have a site that has a set of information that can be edited on one
    > page, but when a certain action is taken, the user mustn't be able to go
    > back and change details etc!!
    > Basically, this is an advanced Timesheet application...when someone enters
    > some hours and clicks Submit, then they are allowed to View the timesheet,
    > but cant Add or Edit items. I've effectively blocked all Back requests,
    > but this makes the site very un-user friendly!! I want the site to
    > evaluate certain things, and allow the user to click back, and to redirect
    > to another page or change the State of the page (to View Only from Edit if
    > the person was on Edit mode previously for example).
    > I don't mind if the site isn't lightening-quick with the Back requests, as
    > I understand that the page needs to go back to the srever if I want things
    > to be evaluated.
    > I'm sure there must be an Accepted Recommended procedure with handling
    > this, but I haven't found it!!
    >
    > Can anyone help me?
    > As it stands, I have the following code included in the Form of each page,
    > and it Blocks the back fine, but isn't optimal!!
    >
    > <%
    > Response.ExpiresAbsolute = Now()
    > Response.Expires = 0
    > Response.CacheControl = "no-cache"
    > Response.Buffer = True
    > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    > Response.Cache.SetExpires (DateTime.UtcNow)
    > Response.Cache.SetNoStore()
    > Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)
    > %>
    >
    >
    > Any advice will be greatly appreciated!!
    >
    > Thanks in advance
    > David Crone
     
    James Hancock, Apr 5, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?RGF2aWQgQ3JvbmU=?=

    David Crone Guest

    Hi James

    The only problem is that if you just click Back, the user doesnt get
    taken back to the server!!
    Also, tracking if the user has Been there before or not isnt reliable,
    as if the user browses back to that page properly, we dont want them to
    be blocked!!

    I have a page that has many different States (Adding, Editing,
    SubmittingForApproval etc).
    Once the user has Approved his timesheet for example, we dont want him
    to be able to edit details in it, but we want him to be able to click
    Back after clicking Approve, and to be able to see the page in View
    mode, and not in Edit mode as he was before. But clicking Back just
    shows the Previous HTML cached!!

    Do you follow what I mean?

    Thanks in advance
    David Crone


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    David Crone, Apr 5, 2004
    #3
  4. Hi David,

    Have you had a chance to check out the suggestions in my last reply or have
    you got any further ideas on this issue? If you have anything unclear or if
    there're anything else we can help, please feel free to post here. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

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

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 8, 2004
    #4
  5. Hi Stephe

    Thanks for your response...could you check the links you included though please, as they dont seem to work, even though I've appended the wrapped text!

    Thanks in advanc
    David Crone
     
    =?Utf-8?B?RGF2aWQgQ3JvbmU=?=, Apr 8, 2004
    #5
  6. Hi David,

    Thanks for the followup.
    The web link in the mail such as
    http://msdn.microsoft.com/newsgroups/managed/default.aspx?dg=microsoft.publi
    c.dotnet.framework.aspnet

    can redirect you to the certain newsgroup but new the exact thread.
    Also, are you using OE to view the post? When there is attachment in
    message, we need to use OE to check the message rather than web interface
    so as to ge the attachement. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

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

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 9, 2004
    #6
  7. =?Utf-8?B?RGF2aWQgQ3JvbmU=?=

    David Crone Guest

    Hi Stephen

    I have OE, but was using my browser for forums etc so far.

    Should I use those links in OE, or how would it work?

    Thanks for your patience; I havent used OE for newsgroups b4!!
    David Crone



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    David Crone, Apr 9, 2004
    #7
  8. Hi David,

    The
    "http://msdn.microsoft.com/newsgroups/managed/default.aspx?dg=microsoft.publ
    ic.dotnet.framework.aspnet "
    address is the weblink to the newsgroup board.

    And the
    "news:microsoft.public.dotnet.framework.aspnet" link
    is for OutLook Express.

    You can view through either as you like. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

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

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 10, 2004
    #8
  9. Hei,

    Are there any changes to the smartnavigation functionality in the Whidbey Visual studio edition.
    To make complex web pages that do not do blinking responses we have to use XML posts or hidden Iframes
    with parent.docum... to set values, because Smartnavigation doesn't work properly (still lots of visible rendering going on).
    For Internet Explorer smartnavigation could be built with xml posts instead and made rendering much more smooth.


    Jo Arild
     
    =?Utf-8?B?Sm8gQXJpbGQ=?=, May 10, 2004
    #9
    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. Mark S.

    Post Backs

    Mark S., Aug 13, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    804
    George Ter-Saakov
    Aug 13, 2003
  2. ALPO

    Stopping post backs possible??

    ALPO, Nov 21, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    334
    Joao S Cardoso [MVP]
    Nov 21, 2003
  3. Jason
    Replies:
    5
    Views:
    385
    darrel
    Dec 10, 2004
  4. Rosanne
    Replies:
    0
    Views:
    494
    Rosanne
    Jun 17, 2005
  5. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    451
    Fredrik Lundh
    Aug 13, 2008
Loading...

Share This Page