rt

解决方案 »

  1.   

    比如说 如下简单的程序,我按完button以后,再按刷新,就提示我"不重新发消息,则无法刷新页面"
    <script runat="server">    void Page_Load()
        {
           if(Page.IsPostBack)
           {
             Label1.Text="good";
           }
        }</script>
    <html>
    <head>
    </head>
    <body>
        <form runat="server">
            <p>
                <asp:Button id="Button1" runat="server" Text="Button" Width="54px" Height="25px"></asp:Button>
            </p>
            <p>
                <asp:Label id="Label1" runat="server" Width="120px">Label</asp:Label>
            </p>
            <!-- Insert content here -->
        </form>
    </body>
    </html>
      

  2.   

    这是因为你的button回传了你在刷新操作前进行过一次post操作,并且是post到当前页面
    这是正常的
      

  3.   

    很明显,你的button_click的操作需要postback 也就是说click以后的页面和初始化的页面是不同的了,所以刷新的时候需要保持click以后的状态。