[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

rahkim

2/12/2004 6:35:00 PM

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
6 Answers

Alessandro Zifiglio

2/13/2004 7:19:00 AM

0

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" <rahkim@hotmail.com> wrote in message
news:8adeed.0402121035.787bfa72@posting.google.com...
> 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


rahkim

2/13/2004 12:31:00 PM

0

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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in message news:<7Z_Wb.6614$HO2.100@news.edisontel.com>...
> 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

2/13/2004 6:09:00 PM

0

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/cpconOutpu...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsettingcacheability...
"Rubble" <rahkim@hotmail.com> wrote in message
news:8adeed.0402130431.7526bff@posting.google.com...
> 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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in
message news:<7Z_Wb.6614$HO2.100@news.edisontel.com>...
> > 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

2/13/2004 7:36:00 PM

0

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/cpconOutpu...

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

"Rubble" <rahkim@hotmail.com> wrote in message
news:8adeed.0402130431.7526bff@posting.google.com...
> 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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in
message news:<7Z_Wb.6614$HO2.100@news.edisontel.com>...
> > 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
> >


rahkim

2/16/2004 6:51:00 PM

0

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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in message news:<UL9Xb.6914$HO2.6063@news.edisontel.com>...
> 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/cpconOutpu...
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsettingcacheability...
>
> "Rubble" <rahkim@hotmail.com> wrote in message
> news:8adeed.0402130431.7526bff@posting.google.com...
> > 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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in
> message news:<7Z_Wb.6614$HO2.100@news.edisontel.com>...
> > > 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

2/16/2004 7:49:00 PM

0

your welcome ;)

"Rubble" <rahkim@hotmail.com> wrote in message
news:8adeed.0402161050.423da085@posting.google.com...
> 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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote in
message news:<UL9Xb.6914$HO2.6063@news.edisontel.com>...
> > 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/cpconOutpu...
> >
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsettingcacheability...
> >
> > "Rubble" <rahkim@hotmail.com> wrote in message
> > news:8adeed.0402130431.7526bff@posting.google.com...
> > > 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" <alessandrozifiglio@NO-SPAM-hotmail.com> wrote
in
> > message news:<7Z_Wb.6614$HO2.100@news.edisontel.com>...
> > > > 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
> > > >