Using Server.transfermethod

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henry

    #1

    Using Server.transfermethod

    Hello

    I'm using server.transfer () to navigate between pages, and I don't
    understand why the URL changes while navigating.

    My start page is default.aspx and from a button I want to navigate to
    frmAdmin.aspx

    so in the onClick event I have the following code
    Server.Transfer ("frmAdmin.aspx ", true)

    Which transfer me to the required page, so far so good, browser still
    displays the URL .../default.aspx

    Now I want to navigate back to the default.aspx
    then I try to use Server.Transfer ("Default.aspx" , false)

    Now the browser displays the URL .../frmAdmin.aspx, which is exactlly what I
    try to avoid and what I thought server.transfer was meant to do.

    Am I completlly wrong here?

    cheers
    Henry






  • Nathan Sokalski

    #2
    Re: Using Server.transfer method

    I have never completely understood the second parameter of the
    Server.Transfer method, but what happens if you use true the second time?
    The few times that I do use the Server.Transfer method (which is only to
    automatically display the login page when they are not already logged in), I
    use the overload that is just the first parameter. It probably would be good
    for me to understand the second parameter better, but until I do, I'm not
    going to try to use it. But I would also suggest that you read some of the
    articles on Server.Transfer vs. Response.Redire ct, Server.Transfer is rarely
    used for all navigation.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    "Henry" <nom@il.com> wrote in message
    news:OUjWMwFkGH A.4224@TK2MSFTN GP05.phx.gbl...[color=blue]
    > Hello
    >
    > I'm using server.transfer () to navigate between pages, and I don't
    > understand why the URL changes while navigating.
    >
    > My start page is default.aspx and from a button I want to navigate to
    > frmAdmin.aspx
    >
    > so in the onClick event I have the following code
    > Server.Transfer ("frmAdmin.aspx ", true)
    >
    > Which transfer me to the required page, so far so good, browser still
    > displays the URL .../default.aspx
    >
    > Now I want to navigate back to the default.aspx
    > then I try to use Server.Transfer ("Default.aspx" , false)
    >
    > Now the browser displays the URL .../frmAdmin.aspx, which is exactlly what
    > I try to avoid and what I thought server.transfer was meant to do.
    >
    > Am I completlly wrong here?
    >
    > cheers
    > Henry
    >
    >
    >
    >
    >
    >[/color]


    Comment

    Working...