日期:2014-05-17  浏览次数:20362 次

页面无刷新传值
有一个发表心情的页面,我想发表心情后在页面上无刷新显示发表内容、时间发表的用户(就像QQ空间发表说说一样)怎样做到???     新手,求高手帮忙解决,谢谢  
------最佳解决方案--------------------
引用:
引用:<asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
用着两个控件可以实现无刷
这两个控件怎么用呢?     能举个列子吗?   谢谢
   ……


<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="lblError" style="color:Red; font-weight:bold"></div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <br />
        
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
              <div style="background-color:#FFFFDD; padding: 20px">
                <asp:Label ID="Label1" runat="server" Font-Bold="True"></asp:Label>
                    <br />
                    <br />
                    <asp:Button ID="Button1" runat="server" Text="Refresh Time" />
                </div>
            </ContentTemplate>           
        </asp:UpdatePanel>
        &nbsp;<asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <div style="background-color:#FFFFDD;padding: 20px">
                    <asp:Label ID="Label2" runat="server" Font-Bold="True"></asp:Label>
                    <br />
                    <br />
             &nb