WEB上实现即使消息到达提醒
----------------------------〉
把这段代码放到一个iframe 里去,定时刷新
----------------------------〉
把这段代码放到一个iframe 里去,定时刷新
解决方案 »
- 服务器连接不上。。。。
- 怎么保存html文章内容
- show out the image
- 高分!!!EXCEL组件问题 急急急!!!!!!!!
- 一个线程的状态怎么会同时有两种?
- 请教一个datagrid的问题!
- 把文件夹绑定到listbox,能显示文件夹里所有的文件名.可当选择一条里面的文件名作为参数,却报错.
- 用什么软件来测试asp.net程序的系统性能??包括 负载性能,在线人数最大承受,从数据库读取上万张帖子性能,服务器内存占用,速度如何
- datagrid处于编辑状态时算column号问题(有些column设置为readonly)
- 在一主页面中,点一LINK弹出新窗口,在新窗口中按钮递交数据完成后,怎样关闭并刷新主页面?
- 请问有没有一个比较好asp.net的例子(框架做的比较好的)
- 关于分页问题。。。
-----
这是一种方法,但是该方法效率很低二、Application+Session+Cache
-----
这种方法怎么做,说来听听
http://aspxcn.com/dotnetdown/show.aspx?id=76
/// 获取最新的任务及送审件的提示信息
/// </summary>
//////////////////////////////////////////////////////////////////////////
[WebMethod(EnableSession=true)]
public string GetTipString()
{
i6.CRM.CLogin cc = new i6.CRM.CLogin();
return cc.wf_getTipInfo();
}客户端代码:
//得到服务器的信息
function loadMsg()
{
document.all["btnAlert"].click();
var divERF = document.all["divERFMsg"];
divERF.useService("./ValidUsers.asmx?WSDL","Tips");
var str = divERF.Tips.callService("GetTipString",divERF);
//alert(str);
}
//定时刷新
window.setInterval(loadMsg,60000);
</script>
//得到信息提示框内容
<script language="javascript" event="onresult" for="divERFMsg">
if(event.result.error)
{
var xfaultcode = event.result.errorDetail.code;
var xfaultstring = event.result.errorDetail.string;
alert(xfaultstring);
return;
}
var str = event.result.value;
if (str+"" !="undefined")
{
divERFMsg.innerHTML = str;
}
</script>其中divERFMsg是一个DIV控件,需要指定BEHAVIOR,如下: <DIV id="divERFMsg" style="Z-INDEX: 111; LEFT: 311px; BEHAVIOR: url(../Resource/inc/webservice.htc); WIDTH: 65%; POSITION: absolute; TOP: 135px; HEIGHT: 64px"
runat="server">
<P><FONT face="宋体"></FONT> </P>
</DIV>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
function Show()
{
iRefresh.document.write(Send("","TaskMsg.aspx"));
iRefresh.document.close();
setTimeout("Show()",5000);
}
//STR参数是传入的XML数据,你也可以传入其他文本数据.
//不过这个函数需要服务器端处理之后返回XML数据,你也可以修改一下
//URL参数表示你所要处理数据的文件地址
function Send(Str,URL)
{
var Http = new ActiveXObject("Microsoft.XMLHTTP"); //建立XMLHTTP对象
Http.open("POST",URL,false);
Http.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
Http.send(Str); //开始发送数据
var Back = Http.responsetext;
delete(Http);
return(Back); //函数返回数据
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0">
<iframe width="100%" height="100%" id="iRefresh" frameborder="no"></iframe>
<script>Show();</script>
</body>
</html>
http是不保存连接的
___________
System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---> System.IO.FileNotFoundException: 找不到文件或程序集名称“em-sn1fk.dll”,或找不到它的一个依赖项。
文件名:“em-sn1fk.dll”
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)Fusion log follows:
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\WINNT\TEMP\em-sn1fk.dll
LOG: Appbase = file:///L:/web_site/AyloChat
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINNT/TEMP/em-sn1fk.dll. --- 内部异常堆栈跟踪的结尾 ---
___________
不知道怎么实现%…………………………
怎么调用那个xmlhttp对象啊
晕