TOP

[ASP.NET] 文字字串遇到http或https時改為超連結

Dim regx As New Regex("http(s)?://([\w+?\.\w+])+([a-zA-Z0-9\~\!\@\#\$\%\^\&\*\(\)_\-\=\+\\\/\?\.\:\;\'\,]*)?", RegexOptions.IgnoreCase)

            Dim mactches As MatchCollection = regx.Matches(MyString)

            For Each match As Match In mactches
                MyString= MyString.ToString.Replace(match.Value, "<a href='" & match.Value & "' target='_blank' >" & match.Value & "</a>")
            Next

參考文章:
http://weblogs.asp.net/farazshahkhan/regex-to-find-url-within-text-and-make-them-as-link

http://www.dotblogs.com.tw/jameswu/archive/2008/04/22/3009.aspx

http://www.allenkuo.com/EBook5/view.aspx?TreeNodeID=67&id=209

http://blog.xuite.net/xiaolian/blog/59321149-%E3%80%90C%23%E3%80%91%E5%AD%97%E4%B8%B2%E6%9C%89%E6%95%88%E8%BD%89%E6%88%90%E8%B6%85%E9%80%A3%E7%B5%90

http://smallpoint-program.blogspot.tw/2012/08/phpemail.html
TOP

[ASP.NET]網頁網址及頁籤加上Icon圖片顯示

1.製作16x16的ICON圖

2.將以下的程式碼放位<head></head>之間
方式1:
<link rel="icon" href="/favicon1.ico" type="image/x-icon" />

方式2:
<link rel="shortcut icon" href="/favicon1.ico" type="image/x-icon" />

參考資料:http://www.tshopping.com.tw/thread-164857-1-1.html