asp.net微信开发(自定义会话管理)(3)

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="MessageWindow.aspx.cs" Inherits="DQWebSite.Administrator.MessageWindow" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <style type="text/css"> .messagestyle { width:100%; height:60px; margin-top:10px; } #LinkBtnSubSend { float:left; } /*.weixiao{ float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:0px 0px; width:30px; height:28px; } .piezui { float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-31px -0px; width:30px; height:28px; } .hanxiao {float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-0px -62px; width:30px; height:28px; } .zhuakuang {float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-218px -62px; width:28px; height:28px; } .shuai {float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-248px -62px; width:28px; height:28px; } .yiwen {float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-126px -62px; width:28px; height:28px; } .liuhan {float:left; background-image:url('images/qqbiaoqing.jpg'); background-repeat:no-repeat; background-position:-404px -30px; width:28px; height:28px; }*/ a:hover { cursor:pointer; } .LinkBtnSubSend { margin-top:5px; } </style> <script type="text/javascript"> function LessThan(oTextArea) { //获得textarea的maxlength属性 var num = oTextArea.getAttribute("maxlength") - oTextArea.value.length; document.getElementById("errmsg").innerHTML = "还可输入的字符数:" + num; //返回文本框字符个数是否符号要求的boolean值 return oTextArea.value.length < oTextArea.getAttribute("maxlength"); } </script> <script type="text/javascript" src="https://www.jb51.net/js/jquery-1.7.1.min.js"></script> <script src="https://www.jb51.net/ckeditor_4.5.4_full2/ckeditor/ckeditor.js"></script> </head> <body> <form runat="server"> <div> <asp:Label runat="server" Text="Label"></asp:Label> <span><asp:Label runat="server" Text="Label"></asp:Label></span> <asp:Label runat="server" Text="Label"></asp:Label></div> <div> <asp:ScriptManager runat="server"></asp:ScriptManager> <asp:UpdatePanel runat="server"> <ContentTemplate> <ul> <asp:Repeater runat="server" OnItemDataBound="RepeaterMessageList_ItemDataBound" > <ItemTemplate> <li><span> <asp:Label runat="server" Text="Label"></asp:Label> </span>对<span><%# Eval("ToUser") %></span>说: <asp:Image runat="server" /> <br /> <%# Eval("Content") %> [<%# Eval("FaSongDate") %>]<br /> </li> </ItemTemplate> </asp:Repeater> </ul> <asp:Timer runat="server" Interval="200" OnTick="timeTick_Tick"></asp:Timer> </ContentTemplate> </asp:UpdatePanel> </div> <textarea runat="server" maxlength="200" onkeypress="return LessThan(this);" onchange="return LessThan(this);"></textarea> <script type="text/javascript">CKEDITOR.replace('<%=txtMessage.ClientID.Replace("_","$") %>');</script> <div> <asp:LinkButton CssClass="LinkBtnSubSend" runat="server"><div>发送</div></asp:LinkButton> <span runat="server" >该推送功能直接将信息推送到对方用户微信,谨慎发言</span> </div> </form> </body> </html>

MessageWindow.aspx.cs的核心代码如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjwjjy.html