整理 Visual Studio 2008 的一些小技巧
三月 13, 2009
工作清單
其它
- Tip #28 Did you know… That 「Go to definition」 is supported for CSS Class?
在 html 編輯畫面,將游標停在 class=’{clasName}’ 按《F12》或滑鼠右鍵選《移至定義(G) 》就可以跳到同一頁面或外部 css 檔的定義。
- Tip #37: Did you know…How to organize usings?
在 cs 編輯畫面, 在檔案開頭 using 區域,點滑鼠右鍵有《組合管理 Using(O) 》,可以①移除未使用的 Using ②排序 Using ③移除和排序
- Tip #35: Did you know…How to add Intellisense from script libraries for JS files?
要在編輯 js 時有 intellisense 功能,只要在檔案開頭加上「/// <reference path="{要參考的js檔}" /> 」
沒試成功。 - Tip #26: Did you know… How to have C# and VB.NET files inside your App_Code directory?
要在 App_Code 同時有 vb 和 cs 程式,要改 web.config。 codeSubDirectories [msdn] - Tip #24: Did you know…You could display CSS/HTML errors as warnings or as errors?
將 html 的 error 改成 warming
- Tip #16: Did you know… How to change the default format settings for CSS Editor?
變更 css 編輯器預設的格式
- Tip #13: Did you know… How to get the browser agent using ASP.NET Ajax ?
用 ASP.NET Ajax 取得瀏覽器的種類。
Sys.Browser.agent [msdn] - Tip #9 Did you know … You can also register your ASP.NET Web User Controls in Web.config?
在 web.config 註冊使用者控制項
<configuration><system.web><pages><controls>
<add tagPrefix="MyControl" src="~/Controls/WebUserControl.ascx" tagName="MyButton"/>