2013年8月30日 星期五
web.config connection string 特殊字元當密碼
connectionString="Server=dbsrv;User ID=myDbUser;Password=somepass"word" " = " http://en.wikipedia.org/wiki/Character_entity#XML_character_entity_references
2013年8月13日 星期二
[VB.Net]SqlDataAdapter的逾時設定
Using da As SqlDataAdapter = New SqlDataAdapter(_strSql, conn)
da.SelectCommand.CommandTimeout = 120
da.Fill(ds, "testDs")
End Using
2013年8月8日 星期四
[VisualBasic] Unicode碼 轉Unicode中文字
fso.CreateTextFile("c:\test.txt", True, True) 'unicode文字檔
fso.OpenTextFile("c:\test.txt", ForAppending, True, TristateTrue)
str:待轉換的中文+Unicode編碼
fso.OpenTextFile("c:\test.txt", ForAppending, True, TristateTrue)
str:待轉換的中文+Unicode編碼
Function Convert(str)
str = Trim(str)
Dim name As String
If InStr(1, str, "&#", 0) > 0 Then '表示有待轉換的編碼
Dim tempArr, tempArr2
tempArr = Split(str, "&#")
For i = 0 To UBound(tempArr)
If IsNumeric(tempArr(i)) Then
name = name & ChrW(tempArr(i))
Else
tempArr2 = Split(tempArr(i), ";")
For j = 0 To UBound(tempArr2)
If IsNumeric(tempArr2(j)) Then
name = name & ChrW(tempArr2(j))
Else
name = name & tempArr2(j)
End If
Next
End If
Next
Convert = name
Else
Convert = str
End If
End Function
2013年7月11日 星期四
改變 IIS 6 上傳___下載限制
Step1. 先停止 IIS 服務 開始 → 系統管理工具 → 服務 停止 IIS Admin Service & World Wide Web Publishing Service Step2. 編輯 C:\windows\system32\inetsrv\metabase.xml Step3. 修改上傳限制 尋找 AspMaxRequestEntityAllowed 預設 204800 (200KB) 改成所需大小(1024*200)。 修改下載限制 尋找 AspBufferingLimit 預設 4194304 (4MB) 改成所需大小(1024*1024*4)。 Step4. 重新啟動 IIS Admin Service & World Wide Web Publishing Service 服務_________ 完成。
2013年6月11日 星期二
2013年6月10日 星期一
JS下拉選單 在IE10底下無作用
公司網頁用的JS下拉選單
在新的Browser IE10、chrome無作用 上網查了
obj.filters.alpha.opacity 新版已不支援此種寫法
filter:alpha(Opacity=20);
在新的Browser IE10、chrome無作用 上網查了
obj.filters.alpha.opacity 新版已不支援此種寫法
filter:alpha(Opacity=20);
var IE = getIEver();
if (IE) {
obj.filters.alpha.opacity += 5
} else {
obj.style.opacity += 5;
}
function getIEver() {
if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE6.0") {
return 1;
} else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE7.0") {
return 1;
} else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0") {
return 1;
} else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0") {
return 1;
}
return 0;
}
訂閱:
文章 (Atom)