tab control state

Discussion in 'ASP .Net Web Controls' started by Rubble, Feb 12, 2004.

  1. Rubble

    Rubble Guest

    Hello,

    Im using the tab control provided my the ie webcontrols. I really
    like it, but I would like to keep the present tab selected when a user
    hits back on the browser. Right now, I have the tab control showing
    some links. When someone selects a particular tab, then visits the
    page, they may hit the back button. If they do that now, it defaults
    back to the first tab in the set. Id like for the tab they had
    selected to still be selected.

    Is this possible?

    Thanks,
    B. Rubble
     
    Rubble, Feb 12, 2004
    #1
    1. Advertising

  2. Hitting the back button does not refresh the page but merrily picks up the
    page from cache. This is how the browser works on the client, not much you
    can do from the server and has nothing to do with your tab control ;P

    "Rubble" <> wrote in message
    news:...
    > Hello,
    >
    > Im using the tab control provided my the ie webcontrols. I really
    > like it, but I would like to keep the present tab selected when a user
    > hits back on the browser. Right now, I have the tab control showing
    > some links. When someone selects a particular tab, then visits the
    > page, they may hit the back button. If they do that now, it defaults
    > back to the first tab in the set. Id like for the tab they had
    > selected to still be selected.
    >
    > Is this possible?
    >
    > Thanks,
    > B. Rubble
     
    Alessandro Zifiglio, Feb 13, 2004
    #2
    1. Advertising

  3. Rubble

    Rubble Guest

    I figured it would work like a form. For example, if you choose
    several options on a form then hit submit...then hit the back button,
    your options would still be selected. The page doesnt refresh or
    change all the values back to the default, but keeps them the way you
    left them.

    Could I set the cache on the user side so that it "remembers" the tab
    or somehow make the tab function like a form, where the selections
    remain unchanged?

    Thanks for the advice!
    B. Rubble



    "Alessandro Zifiglio" <> wrote in message news:<7Z_Wb.6614$>...
    > Hitting the back button does not refresh the page but merrily picks up the
    > page from cache. This is how the browser works on the client, not much you
    > can do from the server and has nothing to do with your tab control ;P
    >
     
    Rubble, Feb 13, 2004
    #3
  4. Rubble,
    When the "BACK" button is clicked, the browser will display the page exactly
    as it were when it was previously viewed. This is to comply with the
    standards set for browser vendors which states that the browser should not
    make another request to a server, but retrieve the page from cache.

    Try the following to disable caching. I havent personally tried but the docs
    clearly state that : If you set cacheability to HttpCacheability.NoCache or
    HttpCacheability.ServerAndNoCache, the requesting client will not cache
    pages in its History folder. For example, any time a user clicks a back or
    forward button, a new version of the response will be requested.

    To programmatically set this try the following in your page_load method:

    Response.Cache.SetCacheability(HttpCacheability.NoCache)



    or try setting this in your .aspx page which should have the same effect as
    the above :
    syntax is : <%@ OutputCache Duration="#ofseconds" Location="Any | Client |
    Downstream | Server | None" Shared="True | False"
    VaryByControl="controlname" VaryByCustom="browser | customstring"
    VaryByHeader="headers" VaryByParam="parametername" %>


    <%@ OutputCache Duration="1" Location="none" VaryByParam="none" %>

    Note where the "Location" attribute is set to none, theorically this should
    have the same effect as programmatically setting
    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    Read the following documentation for details.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconOutputCache.asp

    http://msdn.microsoft.com/library/d...guide/html/cpconsettingcacheabilityofpage.asp
    "Rubble" <> wrote in message
    news:...
    > I figured it would work like a form. For example, if you choose
    > several options on a form then hit submit...then hit the back button,
    > your options would still be selected. The page doesnt refresh or
    > change all the values back to the default, but keeps them the way you
    > left them.
    >
    > Could I set the cache on the user side so that it "remembers" the tab
    > or somehow make the tab function like a form, where the selections
    > remain unchanged?
    >
    > Thanks for the advice!
    > B. Rubble
    >
    >
    >
    > "Alessandro Zifiglio" <> wrote in

    message news:<7Z_Wb.6614$>...
    > > Hitting the back button does not refresh the page but merrily picks up

    the
    > > page from cache. This is how the browser works on the client, not much

    you
    > > can do from the server and has nothing to do with your tab control ;P
    > >
     
    Alessandro Zifiglio, Feb 13, 2004
    #4
  5. Reposting. I dont see my previous post. Hopefully this wont be another
    duplicate ;P

    Rubble,
    When the "BACK" button is clicked, the browser will display the page exactly
    as it were when it was previously viewed. This is to comply with the
    standards set for browser vendors which states that the browser should not
    make another request to a server, but retrieve the page from cache.

    Try the following to disable caching. I havent personally tried but the docs
    clearly state that : If you set cacheability to HttpCacheability.NoCache or
    HttpCacheability.ServerAndNoCache, the requesting client will not cache
    pages in its History folder. For example, any time a user clicks a back or
    forward button, a new version of the response will be requested.

    To programmatically set this try the following in your page_load method:

    Response.Cache.SetCacheability(HttpCacheability.NoCache)



    or try setting this in your .aspx page which should have the same effect as
    the above :
    syntax is : <%@ OutputCache Duration="#ofseconds" Location="Any | Client |
    Downstream | Server | None" Shared="True | False"
    VaryByControl="controlname" VaryByCustom="browser | customstring"
    VaryByHeader="headers" VaryByParam="parametername" %>


    <%@ OutputCache Duration="1" Location="none" VaryByParam="none" %>

    Note where the "Location" attribute is set to none, theorically this should
    have the same effect as programmatically setting
    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    Read the following documentation for details.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconOutputCache.asp

    http://msdn.microsoft.com/library/d...guide/html/cpconsettingcacheabilityofpage.asp

    "Rubble" <> wrote in message
    news:...
    > I figured it would work like a form. For example, if you choose
    > several options on a form then hit submit...then hit the back button,
    > your options would still be selected. The page doesnt refresh or
    > change all the values back to the default, but keeps them the way you
    > left them.
    >
    > Could I set the cache on the user side so that it "remembers" the tab
    > or somehow make the tab function like a form, where the selections
    > remain unchanged?
    >
    > Thanks for the advice!
    > B. Rubble
    >
    >
    >
    > "Alessandro Zifiglio" <> wrote in

    message news:<7Z_Wb.6614$>...
    > > Hitting the back button does not refresh the page but merrily picks up

    the
    > > page from cache. This is how the browser works on the client, not much

    you
    > > can do from the server and has nothing to do with your tab control ;P
    > >
     
    Alessandro Zifiglio, Feb 13, 2004
    #5
  6. Rubble

    Rubble Guest

    Thanks for the info. Ill give that a try. I would have thought that
    when I select a tab then go to the next page, hitting the "BACK"
    button would should me the tab I last selected...but for some reason
    it defaults to the first tab in the series. I guess disabling the
    cache is worth a try.

    Thanks!
    x B. Rubble x

    "Alessandro Zifiglio" <> wrote in message news:<UL9Xb.6914$>...
    > Reposting. I dont see my previous post. Hopefully this wont be another
    > duplicate ;P
    >
    > Rubble,
    > When the "BACK" button is clicked, the browser will display the page exactly
    > as it were when it was previously viewed. This is to comply with the
    > standards set for browser vendors which states that the browser should not
    > make another request to a server, but retrieve the page from cache.
    >
    > Try the following to disable caching. I havent personally tried but the docs
    > clearly state that : If you set cacheability to HttpCacheability.NoCache or
    > HttpCacheability.ServerAndNoCache, the requesting client will not cache
    > pages in its History folder. For example, any time a user clicks a back or
    > forward button, a new version of the response will be requested.
    >
    > To programmatically set this try the following in your page_load method:
    >
    > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    >
    >
    >
    > or try setting this in your .aspx page which should have the same effect as
    > the above :
    > syntax is : <%@ OutputCache Duration="#ofseconds" Location="Any | Client |
    > Downstream | Server | None" Shared="True | False"
    > VaryByControl="controlname" VaryByCustom="browser | customstring"
    > VaryByHeader="headers" VaryByParam="parametername" %>
    >
    >
    > <%@ OutputCache Duration="1" Location="none" VaryByParam="none" %>
    >
    > Note where the "Location" attribute is set to none, theorically this should
    > have the same effect as programmatically setting
    > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    >
    > Read the following documentation for details.
    >
    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconOutputCache.asp
    >
    > http://msdn.microsoft.com/library/d...guide/html/cpconsettingcacheabilityofpage.asp
    >
    > "Rubble" <> wrote in message
    > news:...
    > > I figured it would work like a form. For example, if you choose
    > > several options on a form then hit submit...then hit the back button,
    > > your options would still be selected. The page doesnt refresh or
    > > change all the values back to the default, but keeps them the way you
    > > left them.
    > >
    > > Could I set the cache on the user side so that it "remembers" the tab
    > > or somehow make the tab function like a form, where the selections
    > > remain unchanged?
    > >
    > > Thanks for the advice!
    > > B. Rubble
    > >
    > >
    > >
    > > "Alessandro Zifiglio" <> wrote in

    > message news:<7Z_Wb.6614$>...
    > > > Hitting the back button does not refresh the page but merrily picks up

    > the
    > > > page from cache. This is how the browser works on the client, not much

    > you
    > > > can do from the server and has nothing to do with your tab control ;P
    > > >
     
    Rubble, Feb 16, 2004
    #6
  7. your welcome ;)

    "Rubble" <> wrote in message
    news:...
    > Thanks for the info. Ill give that a try. I would have thought that
    > when I select a tab then go to the next page, hitting the "BACK"
    > button would should me the tab I last selected...but for some reason
    > it defaults to the first tab in the series. I guess disabling the
    > cache is worth a try.
    >
    > Thanks!
    > x B. Rubble x
    >
    > "Alessandro Zifiglio" <> wrote in

    message news:<UL9Xb.6914$>...
    > > Reposting. I dont see my previous post. Hopefully this wont be another
    > > duplicate ;P
    > >
    > > Rubble,
    > > When the "BACK" button is clicked, the browser will display the page

    exactly
    > > as it were when it was previously viewed. This is to comply with the
    > > standards set for browser vendors which states that the browser should

    not
    > > make another request to a server, but retrieve the page from cache.
    > >
    > > Try the following to disable caching. I havent personally tried but the

    docs
    > > clearly state that : If you set cacheability to

    HttpCacheability.NoCache or
    > > HttpCacheability.ServerAndNoCache, the requesting client will not cache
    > > pages in its History folder. For example, any time a user clicks a back

    or
    > > forward button, a new version of the response will be requested.
    > >
    > > To programmatically set this try the following in your page_load method:
    > >
    > > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    > >
    > >
    > >
    > > or try setting this in your .aspx page which should have the same effect

    as
    > > the above :
    > > syntax is : <%@ OutputCache Duration="#ofseconds" Location="Any | Client

    |
    > > Downstream | Server | None" Shared="True | False"
    > > VaryByControl="controlname" VaryByCustom="browser | customstring"
    > > VaryByHeader="headers" VaryByParam="parametername" %>
    > >
    > >
    > > <%@ OutputCache Duration="1" Location="none" VaryByParam="none" %>
    > >
    > > Note where the "Location" attribute is set to none, theorically this

    should
    > > have the same effect as programmatically setting
    > > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    > >
    > > Read the following documentation for details.
    > >
    > >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconOutputCache.asp
    > >
    > >

    http://msdn.microsoft.com/library/d...guide/html/cpconsettingcacheabilityofpage.asp
    > >
    > > "Rubble" <> wrote in message
    > > news:...
    > > > I figured it would work like a form. For example, if you choose
    > > > several options on a form then hit submit...then hit the back button,
    > > > your options would still be selected. The page doesnt refresh or
    > > > change all the values back to the default, but keeps them the way you
    > > > left them.
    > > >
    > > > Could I set the cache on the user side so that it "remembers" the tab
    > > > or somehow make the tab function like a form, where the selections
    > > > remain unchanged?
    > > >
    > > > Thanks for the advice!
    > > > B. Rubble
    > > >
    > > >
    > > >
    > > > "Alessandro Zifiglio" <> wrote

    in
    > > message news:<7Z_Wb.6614$>...
    > > > > Hitting the back button does not refresh the page but merrily picks

    up
    > > the
    > > > > page from cache. This is how the browser works on the client, not

    much
    > > you
    > > > > can do from the server and has nothing to do with your tab control

    ;P
    > > > >
     
    Alessandro Zifiglio, Feb 16, 2004
    #7
    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. Hermit Dave
    Replies:
    0
    Views:
    473
    Hermit Dave
    Jan 22, 2004
  2. News Sympatico
    Replies:
    0
    Views:
    328
    News Sympatico
    May 21, 2005
  3. tab 2 into tab 4 ?

    , Jun 19, 2005, in forum: Python
    Replies:
    2
    Views:
    355
  4. sfp
    Replies:
    1
    Views:
    534
    mrcakey \(The Eclectic Electric\)
    Feb 5, 2007
  5. max
    Replies:
    2
    Views:
    399
    Lambik
    Apr 1, 2007
Loading...

Share This Page