01 2011 档案
获取局域网内部机器的MAC地址
摘要:[DllImport("Iphlpapi.dll")] private static extern int SendARP(Int32 dest, Int32 host, ref Int64 mac, ref Int32 length); [DllImport("Ws2_32.dll")] private static extern Int32 inet_addr(string ip); static private Int64 getremotemac(string localip, string remoteip) { Int32 ldest = inet_addr(remoteip); 阅读全文
posted @ 2011-01-25 14:06 aparche 阅读(604) 评论(0) 推荐(0) 编辑
Asp.net继承母板页后动态载入外部样式表
摘要:asp.net继承了母板页后,如果想单独引用一个样式表,则不能直接在页面用link标签。那要怎么做呢,只需在母板页的head标签里写上:link id="cssName" href="" rel="stylesheet" type="text/css" runat="server"/,然后在后台代码里加入引用样式表的地址。(href置为空,一定要加runat="server")后台代码(最好写在页面加载事件): HtmlLink css = (HtmlLink)Master.FindControl("cssName"); //根据id在母板页中查找该控件css.Href = "../css 阅读全文
posted @ 2011-01-15 22:13 aparche 阅读(598) 评论(0) 推荐(0) 编辑


点击右上角即可分享
微信分享提示