<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8834899018380030761</id><updated>2024-12-18T19:24:20.613-08:00</updated><category term="ASP.NET"/><category term="T-SQL"/><category term="C#"/><category term="軟體分享"/><title type='text'>雨中即景</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-6544763904057778420</id><published>2019-12-12T23:01:00.000-08:00</published><updated>2019-12-14T21:30:23.669-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>T-SQL：FOR XML PATH 多筆輸出資料合併單一欄位輸出</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUMhtcvRuSPkGNI1uAP41MggHxof-3Sjuq2f4uUO7AxQHlH2d3-ngqWb8EzU1cTp2720dA7EfO6EfVx_wlEDlcGeUSgsick3FOCEQ3IrqvdJEjBxZXpECqbNkHLO3TOepfkYG8AhDNvvQi/s1600/images-sqlserver.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUMhtcvRuSPkGNI1uAP41MggHxof-3Sjuq2f4uUO7AxQHlH2d3-ngqWb8EzU1cTp2720dA7EfO6EfVx_wlEDlcGeUSgsick3FOCEQ3IrqvdJEjBxZXpECqbNkHLO3TOepfkYG8AhDNvvQi/s640/images-sqlserver.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; 需要在TSQL輸出時將多筆欄位盒併成單一欄位輸出&lt;br /&gt;&lt;br /&gt;例：&lt;br /&gt;&lt;br /&gt;# mId&lt;br /&gt;&lt;br /&gt;1 A&lt;br /&gt;&lt;br /&gt;2 B&lt;br /&gt;&lt;br /&gt;3 C&lt;br /&gt;&lt;br /&gt;4 D&lt;br /&gt;&lt;br /&gt;5 E&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;輸出變成&lt;br /&gt;&lt;br /&gt;# Finaldata&lt;br /&gt;&lt;br /&gt;A,B,C,D,E&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;這需要用到 FOR XML PATH 來完成&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/zh-tw/sql/relational-databases/xml/for-xml-sql-server?view=sql-server-ver15&quot;&gt;FOR XML (SQL Server)&lt;/a&gt;&lt;br /&gt; T-SQL語法&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select&lt;br /&gt;&lt;br /&gt;LEFT(O.Datalist,LEN(O.Datalist)-1) AS FinalData FROM&lt;br /&gt;&lt;br /&gt;(Select&lt;br /&gt;&lt;br /&gt;(Select CAST(T.mId AS NVARCHAR) + ‘,’&lt;br /&gt;&lt;br /&gt;From (Select X.mId FROM [dbo].[myTable] AS X) T FOR XML PATH(“)) AS ‘Datalist’) O&lt;br /&gt; 簡單的說明一下&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. 先列出要顯示的資料表欄位(如果為多個欄位可在這先行合併欄位)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SELECT X.mId FROM [dbo].[myTable] AS X&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; 執行結果為&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://lifeofprogramcode.files.wordpress.com/2019/12/tsql-20191211-1-1.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. 使用 FOR XML 先合併成 XML格式 ， 範例是用 ( , ) 逗號為欄位連結可自行變更&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select CAST(T.mId AS NVARCHAR) + ‘,’&lt;br /&gt;&lt;br /&gt;From (Select X.mId FROM [dbo].[myTable] AS X) T FOR XML PATH(“)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; 執行結果為&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://lifeofprogramcode.files.wordpress.com/2019/12/tsql-20191211-2.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.依前二個語法執行後，會顯示為 XML格式的結果如左 A,B,C,D,E,&lt;br /&gt;&lt;br /&gt;可看到多了一個逗號，如果想讓結果看起來漂亮一點，&lt;br /&gt;&lt;br /&gt;需再用 LEFT() 來去除逗號&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/zh-tw/sql/t-sql/functions/left-transact-sql?view=sql-server-ver15&quot;&gt;LEFT (Transact-SQL)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;語法如下&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select&lt;br /&gt;&lt;br /&gt;LEFT(O.Datalist,LEN(O.Datalist)-1) AS FinalData FROM&lt;br /&gt;&lt;br /&gt;(Select&lt;br /&gt;&lt;br /&gt;(Select CAST(T.mId AS NVARCHAR) + ‘,’&lt;br /&gt;&lt;br /&gt;From (Select X.mId FROM [dbo].[myTable] AS X) T FOR XML PATH(“)) AS ‘Datalist’) O&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; 執行結果為&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://lifeofprogramcode.files.wordpress.com/2019/12/tsql-20191211-3.jpg&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/6544763904057778420/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2019/12/t-sqlfor-xml-path.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6544763904057778420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6544763904057778420'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2019/12/t-sqlfor-xml-path.html' title='T-SQL：FOR XML PATH 多筆輸出資料合併單一欄位輸出'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUMhtcvRuSPkGNI1uAP41MggHxof-3Sjuq2f4uUO7AxQHlH2d3-ngqWb8EzU1cTp2720dA7EfO6EfVx_wlEDlcGeUSgsick3FOCEQ3IrqvdJEjBxZXpECqbNkHLO3TOepfkYG8AhDNvvQi/s72-c/images-sqlserver.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>台灣</georss:featurename><georss:point>23.69781 120.96051499999999</georss:point><georss:box>16.258457 110.6333665 31.137163 131.28766349999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-2933617716823124037</id><published>2019-12-12T22:52:00.000-08:00</published><updated>2019-12-12T22:52:48.469-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="軟體分享"/><title type='text'>Google Chrome 左邊快捷鍵(Quick Sidebar)取消</title><content type='html'>今天更新Google Chrome時&lt;br /&gt;
發現左邊多了一個 隱藏的快捷鍵選單&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqtGVgIWxcGnpBLvO3qqP_OhyphenhyphenY4gpl8T0kNqdu5jAPJ-yfkGEmXH_ShZLA-KpOXI7joeodaFKaGgYCyqE7P5G163Y4n1fik3TTXBylFiaL2H0DbtjA3niNxdrw6HXwa8cZhAWT5UzVW9U/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;339&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqtGVgIWxcGnpBLvO3qqP_OhyphenhyphenY4gpl8T0kNqdu5jAPJ-yfkGEmXH_ShZLA-KpOXI7joeodaFKaGgYCyqE7P5G163Y4n1fik3TTXBylFiaL2H0DbtjA3niNxdrw6HXwa8cZhAWT5UzVW9U/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
感覺有點多此一舉，因為出現的都是我沒在用的網站&lt;br /&gt;
找了一下 Google Chrome 設定&lt;br /&gt;
可以在 擴充功能 中給他取消&lt;br /&gt;
&amp;nbsp;(但我好像沒有安裝它，不知是否最近 Google Chrome 更新加上去的)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikl58ihO_1FpI445_vTBxjAu64CFmw7XRcsDtbXVYjXEA9GFGCT2iByw2jeQUlc9nAsLfr_ngs0rCZxHUWzNHNQzwbIvd9KwI9s-KJmwKnn_5exAe7GprLMdJIJteptDzfXdiOR3PA084/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikl58ihO_1FpI445_vTBxjAu64CFmw7XRcsDtbXVYjXEA9GFGCT2iByw2jeQUlc9nAsLfr_ngs0rCZxHUWzNHNQzwbIvd9KwI9s-KJmwKnn_5exAe7GprLMdJIJteptDzfXdiOR3PA084/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
再進入擴充功能後，再把&amp;nbsp;Quick Sidebar 這個勾勾拿到就可以了~&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwYCdyPuPusg9oAhdMlZJNWWVByPWVSXTgnBtfAU9gRSavnrN11wuWLze0Rsl8XAWCweRikx2n1fXKvt6drYO4x0k3O-waWnE1KnEpfF5xp_Qi9ZhuKWwvfO0kiXN-QcRJKFRfMY0XaR4/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;436&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwYCdyPuPusg9oAhdMlZJNWWVByPWVSXTgnBtfAU9gRSavnrN11wuWLze0Rsl8XAWCweRikx2n1fXKvt6drYO4x0k3O-waWnE1KnEpfF5xp_Qi9ZhuKWwvfO0kiXN-QcRJKFRfMY0XaR4/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/2933617716823124037/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2014/06/google-chrome-quick-sidebar.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/2933617716823124037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/2933617716823124037'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2014/06/google-chrome-quick-sidebar.html' title='Google Chrome 左邊快捷鍵(Quick Sidebar)取消'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqtGVgIWxcGnpBLvO3qqP_OhyphenhyphenY4gpl8T0kNqdu5jAPJ-yfkGEmXH_ShZLA-KpOXI7joeodaFKaGgYCyqE7P5G163Y4n1fik3TTXBylFiaL2H0DbtjA3niNxdrw6HXwa8cZhAWT5UzVW9U/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>台灣</georss:featurename><georss:point>23.69781 120.96051499999999</georss:point><georss:box>16.258457 110.6333665 31.137163 131.28766349999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-6285701436306817135</id><published>2015-09-19T22:52:00.002-07:00</published><updated>2015-09-19T22:58:28.250-07:00</updated><title type='text'>windows 10 網路芳鄰無法登入</title><content type='html'>之前在使用windows 時，&lt;br /&gt;
會使用//IP+c$ 的來對遠端來存取檔案&lt;br /&gt;
如://127.0.0.1/C$&lt;br /&gt;
連線時會出現 帳號登入的畫面&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1MW1sNNyUFC-vc5_Fh935Fn3Mi-gmu73olUY-ut2jFDtIUHnEJWdMBVOH9fkuChwrgRoAsF7udeeJ_Lasl1O2mdbFFjmTprQzJktokxH_ApDqSol8wydUGWI2GruJpE_qIjZWWVjVLhg/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;124&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1MW1sNNyUFC-vc5_Fh935Fn3Mi-gmu73olUY-ut2jFDtIUHnEJWdMBVOH9fkuChwrgRoAsF7udeeJ_Lasl1O2mdbFFjmTprQzJktokxH_ApDqSol8wydUGWI2GruJpE_qIjZWWVjVLhg/s320/1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在windows 8 之前都只要輸入對方IP電腦的windows帳號密碼就可登入&lt;br /&gt;
但在windows 10 會一直出現帳號權限無法使用&lt;br /&gt;
&lt;br /&gt;
這時只要在使用者名稱輸入時&lt;br /&gt;
加上遠端電腦名稱就可&lt;br /&gt;
例:&lt;br /&gt;
帳號:mypcName\user&lt;br /&gt;
密碼:XXXX&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/6285701436306817135/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2015/09/windows-10.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6285701436306817135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6285701436306817135'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2015/09/windows-10.html' title='windows 10 網路芳鄰無法登入'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1MW1sNNyUFC-vc5_Fh935Fn3Mi-gmu73olUY-ut2jFDtIUHnEJWdMBVOH9fkuChwrgRoAsF7udeeJ_Lasl1O2mdbFFjmTprQzJktokxH_ApDqSol8wydUGWI2GruJpE_qIjZWWVjVLhg/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-342808439342517721</id><published>2015-01-15T08:40:00.000-08:00</published><updated>2015-01-15T08:40:51.110-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>Repeater內控制項在做PostBack時造成Lable資料變成空白</title><content type='html'>在Repeater中的Dropdownlist做PostBack時&lt;br /&gt;
會造成Label控制項的值變為空白&lt;br /&gt;
查了一下&lt;br /&gt;
一般在設定Label時會寫成&lt;br /&gt;
&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text=&quot;&quot; &amp;gt;&amp;lt;%#DataBinder.Eval(Container.DataItem, &quot;labelname&quot;)%&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;
但如果Repeater中有控制項需做到PostBack更新資料&lt;br /&gt;
會發現PostBack後原本Label中的資料都變成空白&lt;br /&gt;
這時可以把Label改寫成&lt;br /&gt;
&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text=&#39;&amp;lt;%#DataBinder.Eval(Container.DataItem, &quot;labelname&quot;)%&amp;gt;&#39;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;
這就可以避免這個問題</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/342808439342517721/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2015/01/repeaterpostbacklable.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/342808439342517721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/342808439342517721'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2015/01/repeaterpostbacklable.html' title='Repeater內控制項在做PostBack時造成Lable資料變成空白'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-4564940939076831753</id><published>2014-05-16T10:06:00.004-07:00</published><updated>2014-05-16T10:06:54.481-07:00</updated><title type='text'>Asp.net 匯出 Excel時 中文檔案名稱在 FireFox 及 Safari 出現亂碼</title><content type='html'>在做Excel資料匯出時&lt;br /&gt;
&lt;br /&gt;
fileName = HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8);&lt;br /&gt;
ms = RenderDataTableToExcel(sourceTable) as MemoryStream;&lt;br /&gt;
HttpContext.Current.Response.AddHeader(&quot;Content-Disposition&quot;, string.Format(&quot;attachment; filename=&quot; + fileName));&lt;br /&gt;
HttpContext.Current.Response.BinaryWrite(ms.ToArray());&lt;br /&gt;
&lt;br /&gt;
雖然有把檔案文字編碼改為 UTF-8&lt;br /&gt;
在 IE,Chrome 都沒問題&lt;br /&gt;
但使用Firefox,Safari就會出現亂碼&lt;br /&gt;
&lt;br /&gt;
拜請了Google大神,知道Firefox,Safari不需做轉碼動作&lt;br /&gt;
所以在匯出時,先判斷瀏覽器&lt;br /&gt;
改為&lt;br /&gt;
if (!((HttpContext.Current.Request.ServerVariables[&quot;http_user_agent&quot;].ToLower().IndexOf(&quot;firefox&quot;) &amp;gt;= 0) || &amp;nbsp;(HttpContext.Current.Request.ServerVariables[&quot;http_user_agent&quot;].ToLower().IndexOf(&quot;safari&quot;) &amp;gt;= 0)))&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; fileName = HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
解決目前的問題</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/4564940939076831753/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2014/05/aspnet-excel-firefox-safari.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/4564940939076831753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/4564940939076831753'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2014/05/aspnet-excel-firefox-safari.html' title='Asp.net 匯出 Excel時 中文檔案名稱在 FireFox 及 Safari 出現亂碼'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-8328968093792532496</id><published>2014-03-29T09:10:00.001-07:00</published><updated>2014-03-29T09:10:11.491-07:00</updated><title type='text'>Visual Studio 方案加入 IIS 網站的權限有問題</title><content type='html'>利用IIS建立網站後&lt;br /&gt;
使用Visual Studio 2013 開啟網站並儲存專案為 sln&lt;br /&gt;
在日後開啟儲存的 sln 檔時&lt;br /&gt;
會出現&lt;br /&gt;
無法存取 IIS Metabase。您沒有足夠權限存取您電腦上的 IIS 網站&lt;br /&gt;
只能先開啟 VS 再用開啟專案的方式才能載入整個網站&lt;br /&gt;
&lt;br /&gt;
解決方式&lt;br /&gt;
您可以利用檔案總管開啟Visual Studio資料夾中的 devenv.exe&lt;br /&gt;
再按右鍵&lt;br /&gt;
選擇[疑難排解相容性]功能&lt;br /&gt;
點選[疑難排解程式]&lt;br /&gt;
勾選[程序要求額外的權限]&lt;br /&gt;
&lt;br /&gt;
參考網址&lt;br /&gt;
&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en-US/59ff3896-9258-42f6-8213-c872a969620b/visual-studio-iis-&quot; target=&quot;_blank&quot;&gt;Visual Studio 方案加入 IIS 網站的權限有問題&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/8328968093792532496/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2014/03/visual-studio-iis.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8328968093792532496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8328968093792532496'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2014/03/visual-studio-iis.html' title='Visual Studio 方案加入 IIS 網站的權限有問題'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-6004491405925014725</id><published>2013-11-19T22:06:00.000-08:00</published><updated>2013-11-20T21:45:48.333-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>網站資料於Facebook 按讚及分享按鈕製作</title><content type='html'>參考&amp;nbsp;&lt;a href=&quot;https://developers.facebook.com/docs/plugins/like-button/&quot;&gt;https://developers.facebook.com/docs/plugins/like-button/&lt;/a&gt;&amp;nbsp;作法&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;(function(d, s, id) {&lt;br /&gt;
&amp;nbsp; var js, fjs = d.getElementsByTagName(s)[0];&lt;br /&gt;
&amp;nbsp; if (d.getElementById(id)) return;&lt;br /&gt;
&amp;nbsp; js = d.createElement(s); js.id = id;&lt;br /&gt;
&amp;nbsp; js.src = &quot;//connect.facebook.net/zh_TW/all.js#xfbml=1&quot;;&lt;br /&gt;
&amp;nbsp; fjs.parentNode.insertBefore(js, fjs);&lt;br /&gt;
}(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the code for your plugin wherever you want the plugin to appear on your page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&quot;fb-like&quot; data-href=&quot;http://chourain.blogspot.tw/&quot; &amp;nbsp;data-layout=&quot;standard&quot; data-action=&quot;like&quot; data-show-faces=&quot;true&quot; data-share=&quot;true&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
記錄下來~以後可以用</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/6004491405925014725/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2013/11/facebook.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6004491405925014725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6004491405925014725'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2013/11/facebook.html' title='網站資料於Facebook 按讚及分享按鈕製作'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-253770799986206099</id><published>2013-10-28T23:26:00.000-07:00</published><updated>2013-10-28T23:26:11.454-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>ASP.Net 4.5 和 4.0在做引用變動時~ 會有 WebForms UnobtrusiveValidationMode 需要 &#39;jquery&#39; 的 ScriptResourceMapping</title><content type='html'>ASP.Net 4.5 和 4.0在做引用變動時~&lt;br /&gt;
會有&lt;br /&gt;
WebForms UnobtrusiveValidationMode 需要 &#39;jquery&#39; 的 ScriptResourceMapping。請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)。&lt;br /&gt;
&lt;br /&gt;
在web.config 中加入&lt;br /&gt;
&amp;lt;appSettings&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;add key=&quot;ValidationSettings:UnobtrusiveValidationMode&quot; value=&quot;None&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/appSettings&amp;gt;&lt;br /&gt;
&lt;br /&gt;
可解決錯誤&lt;br /&gt;
&lt;br /&gt;
參考網址&lt;br /&gt;
&lt;a href=&quot;http://www.codeproject.com/Articles/465613/WebForms-UnobtrusiveValidationMode-requires-a&quot; target=&quot;_blank&quot;&gt;http://www.codeproject.com/Articles/465613/WebForms-UnobtrusiveValidationMode-requires-a&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/253770799986206099/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2013/10/aspnet-45-40-webforms.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/253770799986206099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/253770799986206099'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2013/10/aspnet-45-40-webforms.html' title='ASP.Net 4.5 和 4.0在做引用變動時~ 會有 WebForms UnobtrusiveValidationMode 需要 &#39;jquery&#39; 的 ScriptResourceMapping'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-9012793296986581825</id><published>2013-06-25T19:02:00.001-07:00</published><updated>2013-06-25T19:02:34.877-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>SQL Server Express 版本說明</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;它有幾個主要的限制：&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;資料庫的大小限制：SQL Server 2005 Express 和SQL Server 2008 Express 資料庫的大小限制最大為 
4GB，最新版本的SQL Server 2008 R2 Express 資料庫的大小限制最大為 10G。這個大小的限制只有在資料檔案上，交易記錄檔則不受此限。 
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;只能使用一個 CPU 來運算，這在多個 CPU 的電腦上會造成浪費。 
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;可使用的記憶體量最高只有 1GB。 
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;沒有 SQL Agent，若要做排程服務必須自己寫程式。&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/9012793296986581825/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2013/06/sql-server-express.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/9012793296986581825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/9012793296986581825'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2013/06/sql-server-express.html' title='SQL Server Express 版本說明'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-106281856638830284</id><published>2013-05-09T20:48:00.004-07:00</published><updated>2013-05-09T20:48:30.953-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[IIS設定] 設定單一網站限定某些IP才可連接</title><content type='html'>如果要限定網站只是由某些IP才能連線使用&lt;br /&gt;
可以在IIS上做設定&lt;br /&gt;
&lt;br /&gt;
1.點選要設定的網站-&amp;gt;內容&lt;br /&gt;
2.點選-&amp;gt;目錄安全設定&lt;br /&gt;
3.點選-&amp;gt;IP位址及網址名稱限制-&amp;gt;編輯&lt;br /&gt;
4.點選-&amp;gt;拒絶存取&lt;br /&gt;
5.在下列以外加入你要開放的IP&lt;br /&gt;
單一電腦：直接輸入對方電腦IP&lt;br /&gt;
電腦群組：如圖示輸入對方IP，再對範圍做遮罩的設定&lt;br /&gt;
如圖：&lt;br /&gt;
140.96.0.0/255.255.0.0 表示只要在140.96.X.X的IP都可以連線&lt;br /&gt;
172.19.100.0/255.255.255.0 表示只要在172.19.100.X的IP都可以連線&lt;br /&gt;
網域名稱：就是只有在該網域的電腦才能連線了&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdUWUjPP0bwnRJCrgBQ7-8gcekLAruQcUWJ3360dLNB2fy85AWiwqjJjotwmbprPi9WM9wb9EXbRGu5V8vFSC5r5Cux7b3NMQwPKfuxHWKJo6EOMSkS9KDfPF1Oc6FicaP4HWlj5X-Ji0/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdUWUjPP0bwnRJCrgBQ7-8gcekLAruQcUWJ3360dLNB2fy85AWiwqjJjotwmbprPi9WM9wb9EXbRGu5V8vFSC5r5Cux7b3NMQwPKfuxHWKJo6EOMSkS9KDfPF1Oc6FicaP4HWlj5X-Ji0/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/106281856638830284/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2013/05/iis-ip.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/106281856638830284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/106281856638830284'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2013/05/iis-ip.html' title='[IIS設定] 設定單一網站限定某些IP才可連接'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdUWUjPP0bwnRJCrgBQ7-8gcekLAruQcUWJ3360dLNB2fy85AWiwqjJjotwmbprPi9WM9wb9EXbRGu5V8vFSC5r5Cux7b3NMQwPKfuxHWKJo6EOMSkS9KDfPF1Oc6FicaP4HWlj5X-Ji0/s72-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-5193587030423690537</id><published>2013-03-10T23:14:00.000-07:00</published><updated>2013-03-10T23:14:04.199-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>ValidationSummary 驗證元件與onClientClick共用問題</title><content type='html'>在ASP.NET中使用&lt;br /&gt;
ValidationSummary 驗證元件時&lt;br /&gt;
如果也同時在網頁中使用javascript 的 onClientClick功能&lt;br /&gt;
會出現&lt;br /&gt;
javascript可觸發但ValidationSummary並不會在javascript後再做顯示&lt;br /&gt;
解決方法為&lt;br /&gt;
在程式中的Page_Load加入attributes事件就可以解決&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Button1.Attributes[&quot;onclick&quot;] = @&quot;&lt;br /&gt;
　 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!confirm(&#39;是否確定送出投票資料？&#39;))&lt;br /&gt;
　 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
　　 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;event.returnValue=false;&lt;br /&gt;
　 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&quot;;&lt;br /&gt;
}&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/5193587030423690537/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2013/03/validationsummary-onclientclick.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5193587030423690537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5193587030423690537'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2013/03/validationsummary-onclientclick.html' title='ValidationSummary 驗證元件與onClientClick共用問題'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-5398470666042135069</id><published>2012-10-31T10:01:00.001-07:00</published><updated>2012-10-31T10:01:26.859-07:00</updated><title type='text'>[ASP.Net]CalendarExtender控制項在TextBox ReadOnly=True時取值失敗</title><content type='html'>在使用CalendarExtender控制項時，&lt;br /&gt;
如果TextBox設定為ReadOnly時，&lt;br /&gt;
會出現取值會為 null 的情形，&lt;br /&gt;
參考了~威筆記~&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://tgw1029.blogspot.tw/2010/04/ajaxcalendarextendertextboxreadonlytrue.html&quot; target=&quot;_blank&quot;&gt;http://tgw1029.blogspot.tw/2010/04/ajaxcalendarextendertextboxreadonlytrue.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不在設計模式中設定TextBox的唯獨屬性，而在codebehind的Page_Load事件中使用WebControl.Attributes 屬性動態加入唯獨屬性的設定。&lt;br /&gt;
&lt;br /&gt;
TextBox_abc.Attributes.Add(&quot;readonly&quot;, &quot;true&quot;);&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/5398470666042135069/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnetcalendarextendertextbox.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5398470666042135069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5398470666042135069'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnetcalendarextendertextbox.html' title='[ASP.Net]CalendarExtender控制項在TextBox ReadOnly=True時取值失敗'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-56606762180585324</id><published>2012-10-31T09:10:00.000-07:00</published><updated>2012-10-31T09:10:31.991-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net]參考威筆記 讓Chrome瀏覽器支援MaintainScrollPositionOnPostback屬性</title><content type='html'>&lt;br /&gt;
&lt;h3 class=&quot;post-title entry-title&quot;&gt;
以下為參考 威筆記 文章所留存資料&lt;br /&gt;如有問題請告知&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://tgw1029.blogspot.tw/2010/05/chromemaintainscrollpositiononpostback.html&quot; target=&quot;_blank&quot;&gt;原文網址為 http://tgw1029.blogspot.tw/2010/05/chromemaintainscrollpositiononpostback.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 class=&quot;post-title entry-title&quot;&gt;
&lt;a href=&quot;http://tgw1029.blogspot.tw/2010/05/chromemaintainscrollpositiononpostback.html&quot;&gt;讓Chrome瀏覽器支援MaintainScrollPositionOnPostback屬性&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/zh-tw/library/system.web.ui.page.maintainscrollpositiononpostback%28VS.80%29.aspx&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;MaintainScrollPositionOnPostback&lt;/strong&gt;&lt;/a&gt;主要功能是在Asp.Net的Page中取得或設定值，指出在回傳後是否將使用者返回用戶端瀏覽器中的相同位置。簡單的說就是讓頁面在PostBack後還能保持頁面位置。&lt;br /&gt;&lt;br /&gt;即使我們在Page中設定了MaintainScrollPositionOnPostback為True，但在最近市佔率越來越高的&lt;a href=&quot;http://www.google.com/chrome/index.html?hl=zh-TW&amp;amp;brand=CHMA&amp;amp;utm_campaign=zh_hk&amp;amp;utm_source=zh-TW-ha-apac-tw-bk&amp;amp;utm_medium=ha&quot; target=&quot;_blank&quot;&gt;Chrome&lt;/a&gt;這個&lt;strong&gt;&lt;/strong&gt;以速度快著名的Goolge瀏覽器卻是失效了。&lt;br /&gt;&lt;br /&gt;自己在遇這個問題後，在Google找到此站提供的方式解決了我的問題：&lt;br /&gt;&lt;a href=&quot;http://blog.uni2.tw/post/2009/07/17/e8ae93Chromee7808fe8a6bde599a8e694afe68fb4AspNete79a84MaintainScrollPositionOnPostback.aspx&quot; target=&quot;_blank&quot;&gt;讓Chrome瀏覽器支援Asp.Net的MaintainScrollPositionOnPostback&lt;/a&gt;&lt;br /&gt;但此網頁已失連許久，也在Google找不到相同提供解決方法的網頁(也許有，我沒找到)。因此特地在此記錄並提供給有遇到同樣問題的朋友一個解決的辦法。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;解決方法：&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;首先在Asp.Net中新增一個瀏覽器定義檔，我們要使用這個定義檔來根據不同瀏覽器設定不同運行環境參數。&lt;br /&gt;&lt;a href=&quot;http://lh5.ggpht.com/_2sQfBxJU9mI/S97WKYaZkeI/AAAAAAAAMC4/bq0FluxrsA4/s1600-h/2010-05-03_213205%5B4%5D.jpg&quot;&gt;&lt;img alt=&quot;2010-05-03_213205&quot; border=&quot;0&quot; height=&quot;337&quot; src=&quot;http://lh4.ggpht.com/_2sQfBxJU9mI/S97WLl8bfRI/AAAAAAAAMC8/myelQix8otU/2010-05-03_213205_thumb%5B2%5D.jpg?imgmax=800&quot; style=&quot;border: 0px currentColor; display: inline;&quot; title=&quot;2010-05-03_213205&quot; width=&quot;504&quot; /&gt;&lt;/a&gt;&lt;br /&gt;.browser建立後預設會放在App_Browesers資料夾中。打開.browser後將以下程式碼直接複製貼上：&lt;br /&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; width: 97.5%;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;direction: ltr; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; width: 100%;&quot;&gt;
&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browsers&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;    &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browser&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Safari3&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;parentID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Safari1Plus&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;identification&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;userAgent&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Safari/\d+\.\d+&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;identification&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capture&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;userAgent&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Version/(?&#39;version&#39;\d+\.\d+)&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capture&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capabilities&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capability&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;browser&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Safari3&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capability&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;version&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;${version}&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capabilities&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;controlAdapters&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;adapter&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;controlType&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;System.Web.UI.WebControls.Menu&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;                     &lt;span style=&quot;color: red;&quot;&gt;adapterType&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;controlAdapters&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;    &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browser&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;    &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browser&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;GoogleChrome&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;parentID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Safari3&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;identification&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;userAgent&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Chrome/(?&#39;version&#39;\d+\.\d+)&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;identification&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capabilities&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capability&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;browser&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;Googlebot&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;            &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capability&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;supportsMaintainScrollPositionOnPostback&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;true&quot;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;        &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;capabilities&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;    &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browser&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style=&quot;background-color: white; direction: ltr; font-family: &#39;Courier New&#39;, courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;browsers&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;上面這段程式碼原本主要的用途是用來解決Asp.Net中的Menu控制項，在Chrom與Safari瀏覽器下顯示不完全的問題。詳情可以參考：&lt;a href=&quot;http://www.cnblogs.com/Whikiey/archive/2009/03/03/1402463.html&quot; target=&quot;_blank&quot;&gt;最簡單的方法，讓 ASP.NET Menu 控件在 Google Chrome 瀏覽器上正常顯示&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;按照原作者的方法直接在GoogleChrome的定義中加入這一行程式碼：&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;strong&gt;&amp;lt;capability name=&quot;supportsMaintainScrollPositionOnPostback&quot; value=&quot;true&quot; /&amp;gt;&lt;/strong&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;如此即可解決MaintainScrollPositionOnPostback在Chrome瀏覽器失效的問題了，可謂一舉兩得。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/56606762180585324/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnet-chromemaintainscrollpositiononpo.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/56606762180585324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/56606762180585324'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnet-chromemaintainscrollpositiononpo.html' title='[ASP.Net]參考威筆記 讓Chrome瀏覽器支援MaintainScrollPositionOnPostback屬性'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_2sQfBxJU9mI/S97WLl8bfRI/AAAAAAAAMC8/myelQix8otU/s72-c/2010-05-03_213205_thumb%5B2%5D.jpg?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-6736058551616837811</id><published>2012-10-29T20:37:00.002-07:00</published><updated>2012-10-29T20:37:52.861-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>[SQL] 在SQL2012上建立 連結伺服器</title><content type='html'>請先選擇&lt;br /&gt;
[伺服器物件] =&amp;gt; [連結的伺服器] =&amp;gt; 點選後按右鍵 =&amp;gt;[新增連結的伺服器]&lt;br /&gt;
會出現下列視窗&lt;br /&gt;
填寫：&lt;br /&gt;
連結的伺服器：之後在使用時的連結別名&lt;br /&gt;
提供者：選擇OLEDB For SQL&lt;br /&gt;
資料來源：欲連結的資料庫IP&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmEhaHgvICkwZSmV-XMyP-M12oczbCHfWrDNAlpvffZ1x4wqLCyeHW54JbalcuAo1j5EAc-eRCr_rM5zWnWMhl6Cp8HHxzsg2m3NdyJpHeBSfnJJHg8WW3ydnjO_PklpJg9FR2f2CHWjw/s400/111.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;完成後點選[安全性]功能&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ37JMGKfOzz8Q-2FEdQQowECSYd4UHSmM5QBvPk78LMbE0ULLX6whyN0CWodD7F7gWmriDq0pbLwDKavSvsn9saJC7jUVHF9RZpwq0xtuJ5pXl8emJjdMmc8wpM2DgLULLYT0CIM-vlU/s400/222.png&quot; width=&quot;386&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
請點選[使用此安全性內容建立]&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
把欲連結的資料庫中合法的使用者ID及PWD輸入&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
就完成了~&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/6736058551616837811/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/10/sql-sql2012.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6736058551616837811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6736058551616837811'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/10/sql-sql2012.html' title='[SQL] 在SQL2012上建立 連結伺服器'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmEhaHgvICkwZSmV-XMyP-M12oczbCHfWrDNAlpvffZ1x4wqLCyeHW54JbalcuAo1j5EAc-eRCr_rM5zWnWMhl6Cp8HHxzsg2m3NdyJpHeBSfnJJHg8WW3ydnjO_PklpJg9FR2f2CHWjw/s72-c/111.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-8050656925985719352</id><published>2012-10-29T19:06:00.004-07:00</published><updated>2012-10-29T19:06:49.110-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net] 如何找到UserControl中GridView的ItemTemplate控制項 </title><content type='html'>在使用ascx控制項時,&lt;div&gt;
一樣可使用FindControl來取得ItemTemplate控制項 ,&lt;/div&gt;
&lt;div&gt;
LinkButton lb = (LinkButton)e.Row.FindControl(&quot;LinkButton_abc&quot;);&lt;/div&gt;
&lt;div&gt;
但因為自己忘了去考量&lt;/div&gt;
&lt;div&gt;
e.Row.RowType == DataControlRowType.DataRow&lt;/div&gt;
&lt;div&gt;
這個RowType&lt;/div&gt;
&lt;div&gt;
使得在設定 lb 時一直出現錯誤訊息&lt;/div&gt;
&lt;div&gt;
google一下才想到&lt;/div&gt;
&lt;div&gt;
GridView_RowDataBound&lt;/div&gt;
&lt;div&gt;
是會把所有GridView的Row都做一次&lt;/div&gt;
&lt;div&gt;
所以在DataControlRowType.Header時因沒有ItemTemplate控制項所以一直出現錯誤~&lt;/div&gt;
&lt;div&gt;
但~~~郤一直都沒有想到~~~~@@&lt;/div&gt;
&lt;div&gt;
真的是太久沒有GridView了&lt;/div&gt;
&lt;div&gt;
所以改為&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;string js = &quot;window.open(&#39;abc.aspx&#39;,&#39;資料下載&#39;,&#39;&#39;);&quot;;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
if (e.Row.RowType == DataControlRowType.DataRow)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LinkButton lb = (LinkButton)e.Row.FindControl(&quot;LinkButton_abc&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lb.OnClientClick = js;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
就會正常了~@@&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/8050656925985719352/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnet-usercontrolgridviewitemtemplate.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8050656925985719352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8050656925985719352'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/10/aspnet-usercontrolgridviewitemtemplate.html' title='[ASP.Net] 如何找到UserControl中GridView的ItemTemplate控制項 '/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-8371778532411608371</id><published>2012-10-21T17:47:00.001-07:00</published><updated>2012-10-29T20:25:11.532-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net] Google Chrome 中文字體12px以下無法做用</title><content type='html'>最近寫學校程式&lt;br /&gt;
&lt;div&gt;
有網頁編排需求字體要顯示在7pt或12px以下&lt;/div&gt;
&lt;div&gt;
在DIV設定後&lt;/div&gt;
&lt;div&gt;
IE正常~但google Chrome 就不行&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
找了一下google&lt;/div&gt;
&lt;div&gt;
答案&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
-webkit-text-size-adjust:none;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
在CSS中在入上面一行&lt;/div&gt;
&lt;div&gt;
就解決&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/8371778532411608371/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/10/google-chrome-12px.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8371778532411608371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8371778532411608371'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/10/google-chrome-12px.html' title='[ASP.Net] Google Chrome 中文字體12px以下無法做用'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-5280608325411991269</id><published>2012-09-24T05:12:00.001-07:00</published><updated>2019-12-11T20:37:50.945-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>[T-SQL] select 資料時，依結果自動產生流水號</title><content type='html'>自動產生流水號&lt;br /&gt;
select ROW_NUMBER() OVER(ORDER BY [recordName]) AS RNO from [tableName]</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/5280608325411991269/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/09/t-sqlselect.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5280608325411991269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5280608325411991269'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/09/t-sqlselect.html' title='[T-SQL] select 資料時，依結果自動產生流水號'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-8521798842914351414</id><published>2012-09-11T20:36:00.000-07:00</published><updated>2012-09-11T20:36:09.583-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[CSS樣式無法顯示] ASP.Net 網頁無法顯示 CSS樣式及圖片資料</title><content type='html'>在IIS安裝設定時如果沒有點選&lt;div&gt;
[靜態內容]這個選項&lt;/div&gt;
&lt;div&gt;
會使得&lt;/div&gt;
&lt;div&gt;
網頁在呈現時&lt;/div&gt;
&lt;div&gt;
CSS及圖片資料無法套用及顯示&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
加入[靜態內容]後,重啟IIS就可避免~&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wEc2nWvsAKSQCMPJFlb269HTgUzTi-YivKhnTHLJm6a8iYA5OkLzWZUeyVtT4A-NeI9SG-E3fhUq1p_Ijq2HXiCRR5uv0zSqh2ip9HNwWa8y8PAMxq22McCOL6AXyfoKaRLfhSt7V3w/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;279&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wEc2nWvsAKSQCMPJFlb269HTgUzTi-YivKhnTHLJm6a8iYA5OkLzWZUeyVtT4A-NeI9SG-E3fhUq1p_Ijq2HXiCRR5uv0zSqh2ip9HNwWa8y8PAMxq22McCOL6AXyfoKaRLfhSt7V3w/s320/1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/8521798842914351414/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/09/css-aspnet-css.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8521798842914351414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8521798842914351414'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/09/css-aspnet-css.html' title='[CSS樣式無法顯示] ASP.Net 網頁無法顯示 CSS樣式及圖片資料'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wEc2nWvsAKSQCMPJFlb269HTgUzTi-YivKhnTHLJm6a8iYA5OkLzWZUeyVtT4A-NeI9SG-E3fhUq1p_Ijq2HXiCRR5uv0zSqh2ip9HNwWa8y8PAMxq22McCOL6AXyfoKaRLfhSt7V3w/s72-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-5183790778542514600</id><published>2012-09-02T07:44:00.002-07:00</published><updated>2012-10-29T20:25:04.048-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="軟體分享"/><title type='text'>[軟體] 微軟防毒軟體 Microsoft Security Essentials</title><content type='html'>&lt;br /&gt;
&lt;h2 class=&quot;title_section&quot;&gt;
關於 &lt;span class=&quot;notLocalizable&quot;&gt;Microsoft Security Essentials&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;section sectionNormal&quot;&gt;
&lt;div class=&quot;para&quot;&gt;
使用 &lt;span class=&quot;notLocalizable&quot;&gt;Microsoft Security Essentials&lt;/span&gt; 可防範病毒、間諜軟體和其他惡意軟體。為您的家用或小型企業電腦提供即時的保護。                &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;span class=&quot;notLocalizable&quot;&gt;Microsoft Security Essentials&lt;/span&gt; 不僅是免費*的，而且安裝簡單、容易使用。它會在背景中安靜且有效率地執行，因此您不必擔心受到干擾或需要進行更新。&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;a href=&quot;http://windows.microsoft.com/zh-TW/windows/products/security-essentials&quot; target=&quot;_blank&quot;&gt;微軟防毒軟體 Microsoft Security Essentials 下載&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/5183790778542514600/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/09/microsoft-security-essentials.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5183790778542514600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5183790778542514600'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/09/microsoft-security-essentials.html' title='[軟體] 微軟防毒軟體 Microsoft Security Essentials'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-7869333391542186343</id><published>2012-06-14T23:23:00.002-07:00</published><updated>2012-10-29T20:25:36.458-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net] 在類別.CS檔中使用 Session</title><content type='html'>在.CS檔中~直接用Session[&quot;ABC&quot;] 會無法使用~&lt;br /&gt;
&lt;div&gt;
需&lt;/div&gt;
&lt;div&gt;
改成用 HttpContext.Current.Session[&quot;ABC&quot;]&lt;/div&gt;
&lt;div&gt;
就可以了~&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/7869333391542186343/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2012/06/aspnet-cs-session.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/7869333391542186343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/7869333391542186343'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2012/06/aspnet-cs-session.html' title='[ASP.Net] 在類別.CS檔中使用 Session'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-8370422651462579006</id><published>2011-12-07T18:33:00.001-08:00</published><updated>2012-10-29T20:24:30.185-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>[.Net C#] 遠端伺服器傳回未預期的回應: (417) Expectation failed</title><content type='html'>在用C#做app設計時,&lt;br /&gt;
在連結WS或STMP時會出現這個錯誤訊息~&lt;br /&gt;
可在&lt;br /&gt;
page_load()&lt;br /&gt;
在入一行&lt;br /&gt;
ServicePointManager.Expect100Continue = false;&lt;br /&gt;
就可解決&lt;br /&gt;
&amp;nbsp;發生的原因Google了一下問題為下&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;這個異常源自HTTP1.1協議的一個規範： 100(Continue)
100(Continue)狀態代碼的解釋
允許客戶端發request消息body之前先用request header試探一下server,看server要不要接收request body,再決定要不要發request body。
客戶端在Request頭部中包含
Expect:100-continue
Server接到後如果回100(continue)這個狀態代碼，客戶端就繼續發request body。
這個設置是Http1.1才有。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;參考網址
&lt;a href=&quot;http://www.1000seo.com/soft/csharp/525&quot; target=&quot;_blank&quot;&gt;“远程服务器返回错误: (417) Expectation failed“解决方法&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/8370422651462579006/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2011/12/417-expectation-failed.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8370422651462579006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/8370422651462579006'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2011/12/417-expectation-failed.html' title='[.Net C#] 遠端伺服器傳回未預期的回應: (417) Expectation failed'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-1009839136282907200</id><published>2011-12-03T01:16:00.001-08:00</published><updated>2012-10-29T20:22:45.225-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net] TextBox 換行至 Lable 顯示</title><content type='html'>在使用TextBox做多行輸入時
資料寫至資料庫
再把資料拿出在Lable顯示
因換行方式不同
所以需要做變換參數

a.ToString().Replace(&quot;\r\n&quot;, &quot;&amp;lt;BR&amp;gt;&quot;);</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/1009839136282907200/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2011/12/aspnet-textbox-lable.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/1009839136282907200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/1009839136282907200'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2011/12/aspnet-textbox-lable.html' title='[ASP.Net] TextBox 換行至 Lable 顯示'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-5080766395311890848</id><published>2011-10-05T22:19:00.000-07:00</published><updated>2012-10-29T20:24:44.498-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>[SQL] SQL帳號對應問題</title><content type='html'>之前因工作需要
會做資料庫卸離後再附加在別一個SQL伺服器上
但會出現
雖然帳號相同
但因是不同的SQL伺服器
帳號對應的系統ID並不相同
所以在使用同一個帳號登入時會出現使用者沒有使用權限的問題

可以在SQL中下這個語法,把帳號對應從新對應起來
&lt;br /&gt;
&amp;nbsp;EXEC sp_change_users_login &#39;Update_One&#39;, &#39;帳號A&#39;, &#39;帳號B&#39;;</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/5080766395311890848/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2011/10/sql.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5080766395311890848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/5080766395311890848'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2011/10/sql.html' title='[SQL] SQL帳號對應問題'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-6900135103885866717</id><published>2011-10-02T23:16:00.000-07:00</published><updated>2012-10-29T20:26:13.039-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>[SQL] 以變數方式表示資料表名稱 來select結果</title><content type='html'>今天同事問了一個以表數表示table來進行TSQL的問題&lt;br /&gt;
記得之前有看過別人的文章&lt;br /&gt;
找出來給大家參考一下&lt;br /&gt;
&lt;br /&gt;
declare @table_name varchar(28),@sql nvarchar(4000)&lt;br /&gt;
&lt;br /&gt;
set @table_name=&#39;table_&#39;+&#39;12345&#39;&lt;br /&gt;
&lt;br /&gt;
set @sql=&#39;select * from &#39;+@table_name &lt;br /&gt;
&lt;br /&gt;
exec(@sql)</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/6900135103885866717/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2011/10/tabletsql-declare-tablename.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6900135103885866717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/6900135103885866717'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2011/10/tabletsql-declare-tablename.html' title='[SQL] 以變數方式表示資料表名稱 來select結果'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8834899018380030761.post-3892170099898798804</id><published>2011-09-23T01:33:00.001-07:00</published><updated>2012-10-29T20:22:55.715-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>[ASP.Net] TextBox TextMode為PassWord 的顯示方式</title><content type='html'>在ASP.NET中textBox中TextMode選擇為Password時&lt;br /&gt;
textBpx_Pwd.Text=dr[&quot;pwd&quot;].ToString();&lt;br /&gt;
在前端顯示資料時,並不會把填入資料顯示在網頁上&lt;br /&gt;
&lt;br /&gt;
所以需用script協助寫入&lt;br /&gt;
TextBox_pwd.Attributes.Add(&quot;value&quot;, dr[&quot;pwd&quot;].ToString());</content><link rel='replies' type='application/atom+xml' href='http://chourain.blogspot.com/feeds/3892170099898798804/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://chourain.blogspot.com/2011/09/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/3892170099898798804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8834899018380030761/posts/default/3892170099898798804'/><link rel='alternate' type='text/html' href='http://chourain.blogspot.com/2011/09/blog-post.html' title='[ASP.Net] TextBox TextMode為PassWord 的顯示方式'/><author><name>雨中即景</name><uri>http://www.blogger.com/profile/06935629200741002498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceiLTVjXR0h5NnTCigqJZNf5WcjN-DW9y0YP0Y0-diRKsn4J_Z9aEp2ETfiMWyx2mtPQEe-XNIXF_HOu7kcFgMitO-yo9zn62RCKbjt8tYPt2ttLwOy9G5VIuTi_btw/s107/cropped-rainyday-1.jpg'/></author><thr:total>0</thr:total></entry></feed>