Thanks TDAVISJR. I tried replacing the .. with ~/level1/level2/page1.aspx but
it still doesn't work. I found out something quite peculiar, may be it's by
design? What I have found was, with the Server.Transfer method, only the
parent-child relationship can be maintained. That is, it's OK to navigate
from the Root (parent) to the next level (child) and back, then the root
remains the same. However, if you go from the Root to Level1, then to Level2
as in:
Root
Level1
Page1.aspx
Level2
Page2.aspx
To Page1.aspx, its virtual root now becomes Level1 (instead of the actual
Root). As a consequence, if you navigate from Page2.aspx back to a page under
the actual Root directory, all references are now out of synch. It's quite
bizarre and frustrating to say the least.
As a consequence, I can't use the HttpContext.Current.Items collection to
maintain my Session variables (as it only work with Server.Transfer, not
Response.Redirect).
Can someone prove me wrong here? I'm more than happy if this isn't the case.
KD
[quoted text, click to view] "TDAVISJR" wrote:
> Instead of using the .../. Use the ~ to say go to the root directory.
>
> Server.Transfer("~/secure/Welcome.aspx");
>
> --
> TDAVISJR
> aka - Tampa.NET Koder
>
>
> "Calvin KD" <CalvinKD@discussions.microsoft.com> wrote in message
> news:CC26267F-8C99-43A0-AF34-2F353D56E332@microsoft.com...
> > Hi everyone,
> > I don't know if there's anyone out there is having the same problem. My
> > DotNet 1.1 version uses FormsAuthentication.RedirectFromLoginPage() method
> > to
> > take user from the Login page to the Welcome page. My folder structure is
> > as
> > follows:
> > Root Dir
> > bin
> > images
> > secure
> > Welcome
> > Folder1
> > Page1
> > Folder 2
> > Page 2
> > login
> > stylesheet
> > web.config
> >
> > To navigate to other pages within the application, Server.Transfer()
> > method
> > seems to lose its node's coordinates relative to the whole tree structure.
> > For example, the Welcome page references the stylesheet as
> > ../stylesheet.css
> > and Page1's reference is ../../stylesheet.css. When I used Server.Transfer
> > method to go to Page1 from Welcome page, Page1 cannot find the stylesheet.
> > However, if I replace Server.Transfer with Response.Redirect, all relative
> > references are ok.
> > Can someone shed some light on this problem of mine and tell me what i
> > have
> > done wrong?
> > Any help is greatly appreciated.
> > KD
>
>