紀錄系統登出登入時間

無MasterPage的寫法
——————————————————————————-
<script type=”text/javascript” language=”javascript”>
window.onunload = CloseWindows;
function CloseWindows() {
//按下X關閉
if (event.clientY < 0) {
try {
var xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP”);
//使用者自行關閉視窗時
xmlhttp.open(“POST”,”CloseWindows.aspx”, false);
xmlhttp.send();
return true;
}
catch (e) {
alert(‘close windows error message:’ + e.message);
}
}
}
</script>

Read the rest of this entry »

在 showModalDialog 使用 javascript 執行 location.href

在 showModalDialog 中使用 javascript 執行 location.href = ‘ abc.htm’ 時,會變成開啟一個新的視窗,即使加了<head><base target=”_self” /></head>語法也一樣,此時要使用另一種寫法:

Read the rest of this entry »

消除人聲工具

ASP 呼叫 Web Sevice 的方式

1、先將wsdl另存為xml檔. (例如: c:\Web_Service.xml )
2、程式範例如下:

Set oWS = Server.CreateObject(“MSSOAP.SoapClient30”) oWS.ClientProperty(“ServerHTTPRequest”) = True oWS.MSSoapInit(“C:\Web_Service.xml”)

Read the rest of this entry »

SQL Server 動態 Pivot 欄位

網路上找到的,趕緊記錄下來,可惜就是stored procedure,要不然可用性更大…
— =============================================
— Author:
— Create date: <Create Date,,>
— Description:    –SQLTable(Table或是T-SQL)
–Pivot_Org_Column(要呈現那些原本的欄位名稱)
–Pivot_Use_Expression(轉置欄位要用的運算式,example:sum,max…etc)
–Pivot_Value_Column(需要運算的欄位名稱)
–Pivot_Trans_Column(需轉置欄位,only column)

Read the rest of this entry »

« Older Entries   Newer Entries »