就比如我A网站跳到B网站  但是B网站本身也有跳转的  那地址还能保持A不变吗?能的话,怎么实现呢?

解决方案 »

  1.   

    比如A的地址是www.a.com   B的是 www.b.com/indx.htm C的是www.b.com/game.htm
    A网站跳到B网站  但是B网站又是跳到C的  要达到的效果的是保持IE始终是A的地址www.a.com   但是页面是www.b.com/inde.htm的页面 而且无论点到www.b.com哪个页,地址是哦中是www.a.com
      

  2.   

    使用Server.Transfer方法在页间传值。ASP.NET Server.Transfer()是在两个页面之间进行传值的好方法,从A页面Transfer到B页面时,就可以在B页面通过Context.Handler获得A页面的一个类的实例,从而在B调用A的各个成员对象
      

  3.   


    public partial class a : System.Web.UI.Page{
    protected void LinkButton1_Click(object sender, EventArgs e)
            {
                Server.Transfer("b.aspx");
            }
    }public partial class b : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                Server.Transfer("c.aspx");
            }
        }<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>this is a
            &nbsp;<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">go b.aspx</asp:LinkButton></div>
        </form>
    </body>
    </html>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        this is b
        </div>
        </form>
    </body>
    </html><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        this is c
        </div>
        </form>
    </body>
    </html>
    运行a.aspx 点击 go b.aspx 就会显示出 this is c  看一下吧!
    地址栏没变。