zoukankan      html  css  js  c++  java
  • PageTransfer 页面跳转

    <asp:Button ID="btnRedirect" runat="server" Text="使用Redirect" OnClick="btnRedirect_Click" />

    <asp:Button ID="btnTransfer" runat="server" Text="使用Transfer" OnClick="btnTransfer_Click" />

    <asp:Button ID="btnExecute" runat="server" Text="使用Execute" OnClick="btnExecute_Click" />

    <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/Target.aspx">使用LinkButton</asp:LinkButton>

    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Target.aspx">使用HyperLink</asp:HyperLink>

    <a href="Target.aspx" target="_self">使用超级链接</a>


    <input id="Button1" type="button" value="使用window.location" onclick="window.location='Target.aspx'" />

    protected void btnRedirect_Click(object sender, EventArgs e)
    {
    Response.Redirect("~/Target.aspx");
    }
    protected void btnTransfer_Click(object sender, EventArgs e)
    {
    Server.Transfer("~/Target.aspx");
    }
    protected void btnExecute_Click(object sender, EventArgs e)
    {
    Server.Execute("~/Target.aspx");
    }

  • 相关阅读:
    3D照片放大展示窗口
    [NOI2015]品酒大会
    [SDOI2016]排列计数
    [SCOI2008]奖励关
    HDU4336 Card Collector
    CF540D Bad Luck Island
    [NOI2016]网格
    HDU3076 ssworld VS DDD
    [USACO10HOL]赶小猪
    CF113D Museum
  • 原文地址:https://www.cnblogs.com/Yellowshorts/p/2867833.html
Copyright © 2011-2022 走看看