??xml version="1.0" encoding="utf-8" standalone="yes"?>最新国产精品,粉嫩老牛aⅴ一区二区三区,欧美日韩一区二 http://www.aygfsteel.com/ljy032/category/16973.htmlasp.net zh-cn Thu, 27 Dec 2007 09:14:40 GMT Thu, 27 Dec 2007 09:14:40 GMT 60 解决downlist {优先极高于其它控gQQ在其它控件上?/title> http://www.aygfsteel.com/ljy032/archive/2007/12/26/170583.html风雨兼程 风雨兼程 Wed, 26 Dec 2007 06:35:00 GMT http://www.aygfsteel.com/ljy032/archive/2007/12/26/170583.html http://www.aygfsteel.com/ljy032/comments/170583.html http://www.aygfsteel.com/ljy032/archive/2007/12/26/170583.html#Feedback 0 http://www.aygfsteel.com/ljy032/comments/commentRss/170583.html http://www.aygfsteel.com/ljy032/services/trackbacks/170583.html
<div id="divTool" onmouseover="javascript:showdiv123()" onmouseout="javascript:HiddivTool()" class="class_title" style="display:none">
<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2" bgcolor="ffffff" style="width: 100px" > <span class="t1" style="cursor:hand" name="layout/AddPage.aspx" onclick="javascript:openMyPage(this)">More tools</span></td>
</tr>
<tr>
<td height="20" colspan="2" bgcolor="ffffff" style="width: 100px"> <a href="#">About this tools</a></td>
</tr><tr>
<td height="8" colspan="2" bgcolor="ffffff" style="width: 100px"></td>
</tr>
</table>
</div>
]]> 框架怎样实现高度随内容自动增?/title> http://www.aygfsteel.com/ljy032/archive/2007/04/29/114626.html风雨兼程 风雨兼程 Sun, 29 Apr 2007 10:03:00 GMT http://www.aygfsteel.com/ljy032/archive/2007/04/29/114626.html http://www.aygfsteel.com/ljy032/comments/114626.html http://www.aygfsteel.com/ljy032/archive/2007/04/29/114626.html#Feedback 1 http://www.aygfsteel.com/ljy032/comments/commentRss/114626.html http://www.aygfsteel.com/ljy032/services/trackbacks/114626.html main.htm:
<html> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312' /> <meta name='author' content='F.R.Huang(meizz梅花?//www.meizz.com' /> <title>iframe自适应加蝲的页面高?lt;/title> </head> <body> <div><iframe src="child.htm"></iframe></div> </body> </html>
child.htm:
<html> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312' /> <meta name='author' content='F.R.Huang(meizz梅花?//www.meizz.com' /> <title>iframe 自适应其加载的|页(多浏览器兼容)</title> <script type="text/javascript"> <!-- function iframeAutoFit() { try { if(window!=parent) { var a = parent.document.getElementsByTagName("IFRAME"); for(var i=0; i<a.length; i++) //author:meizz { if(a[i].contentWindow==window) { var h1=0, h2=0; a[i].parentNode.style.height = a[i].offsetHeight +"px"; a[i].style.height = "10px"; if(document.documentElement&&document.documentElement.scrollHeight) { h1=document.documentElement.scrollHeight; } if(document.body) h2=document.body.scrollHeight;
var h=Math.max(h1, h2); if(document.all) {h += 4;} if(window.opera) {h += 1;} a[i].style.height = a[i].parentNode.style.height = h +"px"; } } } } catch (ex){} } if(window.attachEvent) { window.attachEvent("onload", iframeAutoFit); //window.attachEvent("onresize", iframeAutoFit); } else if(window.addEventListener) { window.addEventListener('load', iframeAutoFit, false); //window.addEventListener('resize', iframeAutoFit, false); } //--> </script> </head> <body> <table border="1" width="200" style="height: 400px; background-color: yellow"> <tr> <td>iframe 自适应其加载的|页(多浏览器兼容Q支持XHTML)</td> </tr> </table> </body> </html>
很多人反应在IE7里用它会死机,那是因ؓ在自适应高度时触发了 window.onresize 事gQ而这个事件又去调用这个调?<iframe> 高度的函敎ͼ产生了死循环调用?/p>
]]>Web的桌面提醒(PopupQ? http://www.aygfsteel.com/ljy032/archive/2006/11/07/79655.html风雨兼程 风雨兼程 Tue, 07 Nov 2006 09:32:00 GMT http://www.aygfsteel.com/ljy032/archive/2006/11/07/79655.html http://www.aygfsteel.com/ljy032/comments/79655.html http://www.aygfsteel.com/ljy032/archive/2006/11/07/79655.html#Feedback 0 http://www.aygfsteel.com/ljy032/comments/commentRss/79655.html http://www.aygfsteel.com/ljy032/services/trackbacks/79655.html 大多数WindowsE序都有桌面提醒QPopupQ功能,如Msn MessengerQOutlook2003QFoxMailQSharpReader{,对用h说可以非常的方便最新的信息?/p>
在Web中借用IE5.5+的PopupQ也可以实现cM的功能,?a >CnForums1.2中新增了一U特性就是类gOutlook2003一P当有新帖?Uh留言时就有Popup提示Q如图: 现在技术问题介l一下:
一Q什么是Popup
在IE5.5+中开始支持的PopupH口有很多很特别的特性:
PopupH口可以出览器窗口区域;
可以不用担心被下拉框、flash、Iframe{这些东襉K挡;
xH口没有焦点QPopupH口也可以弹出ƈ昄
一个PopupH口打开后,当在它的区域以外点击或者另一个PopupH口被打开旉会自动关闭;
PopupH口是没有焦点的Q?
用户不能改变PopupH口大小Q?
PopupH口中的内容是不能被选择的;
......
只是Web下的Popup比vWindows中的Popupq是׃些,但是已经够用了。Msdn上对Popup有非常详l的介绍?a onmousedown="return clk(this,'res',1)" target="_blank">Using the Popup Object (Internet Explorer - DHTML) ?/p>
二,怎么创徏一个Popup
Msdn上的CZ代码Q?/pre>
//
创徏Popup对象
var
oPopup
=
window.createPopup();
//
Popup对象和Window对象一P里面包含了一个完整的HTML文
var
oPopupBody
=
oPopup.document.body;
//
在Body中插入HTML
oPopupBody.innerHTML
=
"
Display some <B>HTML</B> here.
"
;
//
讄昄的位|、大、参照物
oPopup.show(
100
,
100
,
200
,
50
, document.body);
三,Popup的显C?/p>
多个Popup不能共存QPopup中创建Popup除外Q,所以web中的Popup不方便像Msn Messenger的Popup提示那样“爬楼梯”,所以最单有效的Ҏ是像Outlook2003的Popup一P逐个Popup提醒?br />Q参考WebMessenger的实玎ͼ用JsZ队列Q将需要Popup提示的内定w攑֜队列中,用一个定时器Q定时从队列中取一个PopupQ每个Popup昄7U?/p>
四,怎么知道有新帖子
在WebE序中,只能通过“拉”的技术,卛_时向服务器发送请求——通过定时h或者是xmlhttp的Get?br />我们需要有个时间戳来记录最后请求时_q样好Ҏq个旉x获取旉戳之后的帖子?br />如果每次Ҏ旉x获取最新帖子,服务器负h较大Q因为ƈ不是每次h都有新帖子的Q优化一下,再给每个在线用户讄有无新帖子、有无新留言的状态位Q当发表新帖子后更新每个人的“有无新帖”状态位。这hơ请求时先判断有没有新帖子,如果有新帖子Q才获取所有帖子的标题和内容简要?/p>
五,具体实现
客户端代码:http://webuc.net/MyProject/Popup/popup.htm http://webuc.net/MyProject/Popup/popup.rar
和论坛程序的l合Q?br />demo: http://bbs.openlab.net.cn (d后有新帖子即提示(IE5.5+))http://bbs.openlab.net.cn/PostAttachment.aspx?PostID=376725
参考文章:无限菜单?xml+popup ?IE5.5+)
]]> asp.net2.0中用客L回调实现无刷新应? http://www.aygfsteel.com/ljy032/archive/2006/11/07/79607.html风雨兼程 风雨兼程 Tue, 07 Nov 2006 06:59:00 GMT http://www.aygfsteel.com/ljy032/archive/2006/11/07/79607.html http://www.aygfsteel.com/ljy032/comments/79607.html http://www.aygfsteel.com/ljy032/archive/2006/11/07/79607.html#Feedback 0 http://www.aygfsteel.com/ljy032/comments/commentRss/79607.html http://www.aygfsteel.com/ljy032/services/trackbacks/79607.html 在asp.net1.1中我们可以通过JS调用Web服务来实现无h应用,现在asp.net2.0可以用Client Callback的方法实?q样变得更加方便和容易用了.客户端回调功能的实现需要两? 1.为控件或面实现ICallbackEventHandler接口,该接口有一个方法public string RaiseCallbackEvent(string eventArgument),q个Ҏ的原理是接收客户端发送过来的参数,然后q回一个结果字W串l客Lq行处理.例如: public partial class ShowReview_ascx : ICallbackEventHandler { public string RaiseCallbackEvent(string eventArgument) { int reviewId = int.Parse(eventArgument); Discussion discussion = AspNetCommerce.DiscussionManager.GetDiscussion(reviewId); StringBuilder sb = new StringBuilder(); sb.AppendFormat("<table class='{0}>", "ShowReview_ascx_DisTable"); foreach (DiscussionItem item in discussion) { //输出html } sb.Append("</table>"); return sb.ToString(); } } 该方法接收客L的传来的一个参?转换?reviewId,ҎreviewId查询出相x据以html形式q回l客L. 2.实现两个客户端脚?q用Page.GetCallbackEventReference说明客户端如何处理返回结? 例如: Page.GetCallbackEventReference(this, "topicid", "HandleResultFromServer", "context", "HandleErrorResultFromServer") this表示实现ICallbackEventHandler的控件的实例, topicid表示客户端传入的字符串参数数 HandleResultFromServer表示处理成功调用后的l果的客L脚本函数? context表示回调的启动方法处与处理回调结果的Ҏ之间的传递参? HandleErrorResultFromServer表示处理p|调用后的l果的客L脚本函数? 部分客户端脚本如: void Page_Load(object sender, EventArgs e) { if (!IsPostBack || !this.EnableViewState) { StringBuilder sb = new StringBuilder(); sb.Append("function loadtree(topicid){"); sb.Append("var targetImg = document.all('img_'+topicid);"); sb.Append("var targetDiv = document.all('tr_'+topicid);"); sb.Append("if (targetDiv.style.display != 'block'){"); sb.Append("targetDiv.style.display = \"block\";"); sb.AppendFormat("targetImg.src = \"{0}\";", AspNetCommerce.CommerceContext.GetThemesImagePathForImgTag("ShowReview_ascx/Expand-Open.gif")); sb.Append("targetImg.alt = \"点击收回\";"); sb.Append("var context = topicid;"); sb.AppendFormat("{0}", Page.GetCallbackEventReference(this, "topicid", "HandleResultFromServer", "context", "HandleErrorResultFromServer")); sb.Append("}else{"); sb.Append("targetDiv.style.display = \"none\";"); sb.AppendFormat("targetImg.src = \"{0}\";", AspNetCommerce.CommerceContext.GetThemesImagePathForImgTag("ShowReview_ascx/Expand-Closed.gif")); sb.Append("targetImg.alt = \"点击查看讨论\";"); sb.Append("}"); sb.Append("}"); sb.Append("function HandleResultFromServer(result,context)"); sb.Append("{"); sb.Append("var targetTd = document.all('td_'+context);"); sb.Append("targetTd.innerHTML = result"); //sb.Append("alert(result);"); sb.Append("}"); sb.Append("function HandleErrorResultFromServer(result,context)"); sb.Append("{"); sb.Append("var targetTd = document.all('td_'+context);"); sb.AppendFormat("targetTd.innerHTML = '<font color=red>{0}</font>'", "数据读错?请重新再试或通知理?"); sb.Append("}"); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ClientCallBack", sb.ToString(), true); } }
]]> Asp.Net Forums中对.Net中序列化和反序列化的应用 http://www.aygfsteel.com/ljy032/archive/2006/11/07/79603.html风雨兼程 风雨兼程 Tue, 07 Nov 2006 06:27:00 GMT http://www.aygfsteel.com/ljy032/archive/2006/11/07/79603.html http://www.aygfsteel.com/ljy032/comments/79603.html http://www.aygfsteel.com/ljy032/archive/2006/11/07/79603.html#Feedback 0 http://www.aygfsteel.com/ljy032/comments/commentRss/79603.html http://www.aygfsteel.com/ljy032/services/trackbacks/79603.html 在Forums中,有些内容是不固定的,例如用户资料Q除了一些基本资料,可能q要有一些其他资料信息,例如MSN、个Zc签名{,一般对于这L都是每一个属性对应于数据库中的一个字Dc但是如果以后我们因为需要增加一些属性,例如QQ受Blog地址{,如果q是用这U增加数据表字段的方法,那么会频繁的修Ҏ据库表结构、存储过E、数据库讉K的程序?/p>
或许您也遇到q类似问题,看Forums中是怎么借用.Net的序列化和反序列化来解决的: 例如我需要在用户资料里面增加QQ可个属性,那么我只需要在UsercM增加一个属?br />public String QQIM { get { return GetExtendedAttribute("QQIM"); } set { SetExtendedAttribute("QQIM", value); } } 不需要修Ҏ据库表结构,不需要修改存储过E,q数据库讉K的程序都不需要动?/p>
其具体实现的主要代码Q?br />
//
首先新徏在UsercM新徏一个NameValueCollection对象Q将q些扩展属性都保存在NameValueCollection对象?/span>
NameValueCollection extendedAttributes
=
new
NameValueCollection();
//
从NameValueCollection集合中取U录
public
string
GetExtendedAttribute(
string
name)
{
string
returnValue
=
extendedAttributes[name];
if
(returnValue
==
null
)
return
string
.Empty;
else
return
returnValue; }
//
讄扩展属性的在NameValueCollection中的键值和?/span>
public
void
SetExtendedAttribute(
string
name,
string
value)
{ extendedAttributes[name]
=
value; }
//
extendedAttributes对象Q前面定义的用来保存所有的用户扩展信息的NameValueCollection对象Q序列化为内存流
//
可以用来保存到数据库?/span>
public
byte
[] SerializeExtendedAttributes()
{
//
序列化对?/span>
BinaryFormatter binaryFormatter
=
new
BinaryFormatter();
//
创徏一个内存流Q序列化后保存在其中
MemoryStream ms
=
new
MemoryStream();
byte
[] b;
//
extendedAttributes对象Q里面保存了所有的用户扩展信息Q序列化为内存流
//
binaryFormatter.Serialize(ms, extendedAttributes);
//
讄内存的起始位置
//
ms.Position
=
0
;
//
d刊Wbyte 数组
//
b
=
new
Byte[ms.Length]; ms.Read(b,
0
, b.Length); ms.Close();
return
b; }
//
反序列化extendedAttributes对象的内?
//
从数据库中读取出来的
public
void
DeserializeExtendedAttributes(
byte
[] serializedExtendedAttributes)
{
if
(serializedExtendedAttributes.Length
==
0
)
return
;
try
{ BinaryFormatter binaryFormatter
=
new
BinaryFormatter(); MemoryStream ms
=
new
MemoryStream();
//
byte 数组到内存流
//
ms.Write(serializedExtendedAttributes,
0
, serializedExtendedAttributes.Length);
//
内存流的位|到最开始位|?
//
ms.Position
=
0
;
//
反序列化成NameValueCollection对象Q创建出与原对象完全相同的副?
//
extendedAttributes
=
(NameValueCollection) binaryFormatter.Deserialize(ms); ms.Close(); }
catch
{}
}
实质上序列化机制是将cȝD{化ؓ一个一般的Q即q箋的)字节,然后可以将该流保存到数据库的某个字D中Q在数据库中forums_UserProfile表中有一个字D“StringNameValues varbinary(7500)”)。读取的q程对对象进行反序列化时Q创建出与原对象完全相同的副本?/p>
注意一般这cd性在数据库中是不能被索到的,q且要这些属性能被序列化?/strong>
]]>
վ֩ģ壺
ɽ |
|
ˮ |
|
|
|
Թ |
ȷ |
|
ʡ |
ߴ |
|
ԭ |
˳ |
ǰ |
|
|
|
|
ǿ |
|
|
|
|
|
|
÷ |
|
|
ɽ |
|
² |
|
|
|
|
|
ӽ |
|
½ |
|