我从websocket中获得了一些文本,然后将其放入ASPxMemo
<asp:UpdatePanel ID="UpdatePanel1" runat="server" OnUnload="UpdatePanel1_Unload" UpdateMode="Conditional">
<ContentTemplate>
<dx:ASPxMemo runat="server" Height="100px" Width="100%" ID="Messages" ClientInstanceName="MessagesListBox"></dx:ASPxMemo>
</ContentTemplate>
</asp:UpdatePanel>
我尝试通过websocket_messagereceived方法调用更新我的备忘录
public void websocket_messagereceived(object sender, MessageReceivedEventArgs e)
{
Messages.Text += "New Message";
UpdatePanel1.Update();
}
但是它不起作用。为什么? 谢谢!