Well that looks interesting. All of my navigation links are generated using
the asp server side controls. Hadn't thought of using the code behind to set
up the urls though. Can you give me a bit of help in getting started on
this? For example if I have the following:
Root
default.aspx consisting of 1 nav user control nav.ascx
Root/subfolderA
PageA.aspx consisting of 1 nav user control nav.ascx
Root/subfolderA/subfolderB
PageAB.aspx consisting of 1 nav user control nav.ascx
Right now I would have to code each user control seperately based on their
relative position in the web even though each nav.ascx displays all the
files the user needs to get to. (of course the premise is that I wish to
continue to use cookie munging.) This is because each user control is
relative depending on the aspx page that calls it vs where it (the ascx)
actually exists.
If I understand your suggestion correctly you are saying that I could keep
one (my root for example) nav.ascx and use it from any aspx page within the
heirarchy by referencing the session.sessionid in the nav.ascx code behind?I
f that is true it would certainly solve the problem.
Can you give me a simple (I'm not very bright) example of the code for the
code behind and the ascx code for a couple of levels (maybe using the folder
structure I mentioned earlier)? Actually just one would probably do me. For
example how would I reference the session.sessionid in the code behind and
then retrieve that in the asp hyperlink?
Thanks in advance.
<ch***@yahoo.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...
Hi Seaside,
I think I've figured out how to do it. May or may not work for you. My
menu is an asp.net menu created server side, so i've basically changed the base
url (ie: "/site/") to "/site/(sjkfj23jsdfjlsdkfj)/" note - the
sjkfj23.... etc. is referenced in code behind using session.sessionID
If your menu is generated server side, then this will work for you. If
it's just a client-side menu that you don't generate in code, then it won't.
Hope that helps???
Chris
"Seaside" <ss@hotmail.com> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl... I had the same problem and wound up changing the menu system so that my
navigation is in 4 different controls vs. one. Each control is located
in a position so that it can use relative paths with respect to the page.
Instead of making a change in one nav control I have to make it in 4 but it is
still worth it in order to use cookie munging. My users refuse to allow
cookies. Hope your post results in a better option , I'd love to get back to
using one nav control vs 4.
<ch***@yahoo.com> wrote in message
news:ex*************@tk2msftngp13.phx.gbl... Hi,
I'm trying to use the cookie munging session handling behaviour of
asp.net instead of cookies themselves as I'm finding quite a few people are
barring cookies (especially AOL users). If I change the setting in web.config
everything seems to work fine as long as I'm using relative paths.
The problem is I've got a menuing system that's generated from a site-wide
template - so I use a fixed path from the application root - (ie:
/application/sub-dir/page.aspx) because I don't actually know where
the user is at any given moment because it's a site-wide menu.
Whenever someone clicks on one of them, the Session ID gets wiped from the URL and the user gets logged out. Am I missing something really
stupid here? How can I persist the SessionID in these URLs?
Cheers
Chris