<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>守望轩 &#187; Visual Studio</title>
	<atom:link href="http://www.watch-life.net/tag/visual-studio/feed" rel="self" type="application/rss+xml" />
	<link>http://www.watch-life.net</link>
	<description>关注IT,审视自我,守望生活, 宁静雅致的小轩馆.</description>
	<lastBuildDate>Sat, 13 Mar 2010 15:38:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>web developer tips (64): 在GridView中转换BoundField为TemplateField</title>
		<link>http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html</link>
		<comments>http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 02:37:29 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[DetailsView]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[web developer tips]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=471</guid>
		<description><![CDATA[原文地址：How to convert a GridView column from asp:BoundField to asp:TemplateField in Design View
假定你有个数据源SqlDataSource1 ，绑定了一个简单的查询语句，返回Customers表的详细信息。
http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html

&#60;asp:SqlDataSource ID=&#34;SqlDataSource1&#34; runat=&#34;server&#34; 
ConnectionString=&#34;&#60;%$ ConnectionStrings:MyConnectionString %&#62;&#34; 
SelectCommand=&#34;SELECT [FirstName], [LastName], [Email] FROM [Customers] ORDER BY
[FirstName]&#34;&#62;
&#60;/asp:SqlDataSource&#62;

在Visual Studio里，在web forms 页面的设计视图添加一个GridView,选择 SqlDataSource1作为数据源，通常GridView 列会生成 BoundField型数据


&#160;&#60;asp:GridView ID=&#34;GridView1&#34; runat=&#34;server&#34; AutoGenerateColumns=&#34;False&#34;

DataSourceID=&#34;SqlDataSource1&#34;&#62;
&#60;Columns&#62;
&#60;asp:BoundField DataField=&#34;FirstName&#34; HeaderText=&#34;FirstName&#34; 
SortExpression=&#34;FirstName&#34; /&#62;
&#60;asp:BoundField DataField=&#34;LastName&#34; HeaderText=&#34;LastName&#34; 
SortExpression=&#34;LastName&#34; /&#62;
&#60;asp:BoundField DataField=&#34;Email&#34; HeaderText=&#34;Email&#34; SortExpression=&#34;Email&#34; /&#62;
&#60;/Columns&#62;
&#60;/asp:GridView&#62;

通常，你想自定义一列或多列从BoundField转换到TemplateField，这里我们把Email列转换成TemplateField。在GridView的智能标签面板里单击“Edit Columns”。然后在弹出的对话框选择“Email”字段，并单击“Convert this field into a TemplateField”


Email 字段的代码会进行更新，如下所示：

&#60;asp:TemplateField [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/05/27/tip-64-did-you-know-how-to-convert-a-gridview-column-from-asp-boundfield-to-asp-templatefield-in-design-view.aspx" target="_blank">How to convert a GridView column from asp:BoundField to asp:TemplateField in Design View</a></p>
<p>假定你有个数据源SqlDataSource1 ，绑定了一个简单的查询语句，返回Customers表的详细信息。<br />
<a href="http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html" target="_blank">http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html</a></p>
<div class=code>
&lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; <br />
ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnectionString %&gt;&quot; <br />
SelectCommand=&quot;SELECT [FirstName], [LastName], [Email] FROM [Customers] ORDER BY<br />
[FirstName]&quot;&gt;<br />
&lt;/asp:SqlDataSource&gt;
</div>
<p>在<a href="http://www.watch-life.net/tag/visual-studio" target="_blank">Visual Studio</a>里，在web forms 页面的设计视图添加一个<a href="http://www.watch-life.net/tag/GridView" target="_blank">GridView</a>,选择 SqlDataSource1作为数据源，通常GridView 列会生成 BoundField型数据</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ChooseDataSource" border="0" alt="ChooseDataSource" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip64DidyouknowHowtoconvertaGridViewcolu_8EB0/ChooseDataSource_thumb.jpg" width="484" height="184" /></p>
<div class=code>
&nbsp;&lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot;<br />
<br />
DataSourceID=&quot;SqlDataSource1&quot;&gt;<br />
&lt;Columns&gt;<br />
&lt;asp:BoundField DataField=&quot;FirstName&quot; HeaderText=&quot;FirstName&quot; <br />
SortExpression=&quot;FirstName&quot; /&gt;<br />
&lt;asp:BoundField DataField=&quot;LastName&quot; HeaderText=&quot;LastName&quot; <br />
SortExpression=&quot;LastName&quot; /&gt;<br />
&lt;asp:BoundField DataField=&quot;Email&quot; HeaderText=&quot;Email&quot; SortExpression=&quot;Email&quot; /&gt;<br />
&lt;/Columns&gt;<br />
&lt;/asp:GridView&gt;
</div>
<p>通常，你想自定义一列或多列从BoundField转换到TemplateField，这里我们把Email列转换成TemplateField。在GridView的智能标签面板里单击“Edit Columns”。然后在弹出的对话框选择“Email”字段，并单击“Convert this field into a TemplateField”</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="EditColumns" border="0" alt="EditColumns" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip64DidyouknowHowtoconvertaGridViewcolu_8EB0/EditColumns_thumb.jpg" width="484" height="281" /></p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ConvertToTemplateField" border="0" alt="ConvertToTemplateField" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip64DidyouknowHowtoconvertaGridViewcolu_8EB0/ConvertToTemplateField_thumb.jpg" width="484" height="394" /></p>
<p>Email 字段的代码会进行更新，如下所示：</p>
<div class=code>
&lt;asp:TemplateField HeaderText=&quot;Email&quot; SortExpression=&quot;Email&quot;&gt;<br />
&lt;EditItemTemplate&gt;<br />
&lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; Text=&#8217;&lt;%# Bind(&quot;Email&quot;) %&gt;&#8217;&gt;&lt;/asp:TextBox&gt;<br />
&lt;/EditItemTemplate&gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text=&#8217;&lt;%# Bind(&quot;Email&quot;) %&gt;&#8217;&gt;&lt;/asp:Label&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;/asp:TemplateField&gt;
</div>
<p>对于DetailsView控件，也可以参照类似的方法去做，在DetailsView的智能标签面板选择“Edit Fields”即可。</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="EditFields" border="0" alt="EditFields" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip64DidyouknowHowtoconvertaGridViewcolu_8EB0/EditFields_thumb.jpg" width="484" height="244" /></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/new-style-builder-can-be-invoked-from-various-other-tool-windows-in-visual-web-developer.html" title="web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (2009-06-25)">web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-web-developer-2008-has-a-new-style-builder-dialog.html" title="web developer tips (10):Visual Web Developer 2008中新的样式生成器 (2009-06-23)">web developer tips (10):Visual Web Developer 2008中新的样式生成器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/know-how-to-scope-master-pages.html" title="web developer tips (40):定义母版页的作用范围 (2009-08-31)">web developer tips (40):定义母版页的作用范围</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/change-the-default-format-settings-for-css-editor.html" title="web developer tips (16):变更CSS编辑器的默认格式设置 (2009-07-06)">web developer tips (16):变更CSS编辑器的默认格式设置</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/improve-performance-of-page-and-server-control-processing.html" title="web developer tips (22):提高页面和服务器控件加载速度 (2009-07-15)">web developer tips (22):提高页面和服务器控件加载速度</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-enable-edit-and-continue-feature-for-web-application-projects.html" title="web developer tips (29):在web应用项目里启用“编辑并继续”功能 (2009-07-23)">web developer tips (29):在web应用项目里启用“编辑并继续”功能</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/iis-remote-management-for-windows-7.html" title="web developer tips (72): 在Windows 7中使用IIS远程管理器 (2010-01-11)">web developer tips (72): 在Windows 7中使用IIS远程管理器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/register-your-ihttpmodule-depends-on-the-pipeline.html" title="web developer tips (43):通过请求处理管道注册IHttpModule (2009-09-06)">web developer tips (43):通过请求处理管道注册IHttpModule</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (63): 在web应用项目指定vs开发服务器端口</title>
		<link>http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html</link>
		<comments>http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html#comments</comments>
		<pubDate>Sun, 15 Nov 2009 15:59:47 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Development Server]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[开发服务器]]></category>
		<category><![CDATA[端口]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=470</guid>
		<description><![CDATA[原文地址：How to specify a fixed port for Visual Studio Development Server while using WAPs?
在web developer tips (21)讲述在网站项目中为  Visual Studio 开发服务器 （Development Server） 设置固定的端口。本tips将讲述如何为web应用项目配置固定的发布端口（port ）。
http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html
1、打开web应用项目的属性页。右键单击web应用项目，在上下文菜单选择“属性”，打开属性页

2、在属性页选择“web”标签
3、在服务器选项里，选中“使用Visual Studio 开发服务器 ”项，选中“特定端口”并输入你想运行的端口

4、用浏览器查看页面，你将看到Visual studio 已经为开发服务器分配了你指定的端口



	你可能也会喜欢以下文章：
	
	web developer tips (7):在ListView控件里对数据排序 (1)
	web developer tips (59):粘贴时在VS中自动格式化HTML (0)
	web developer tips (35):为js文件中的脚本库添加智能提示 (0)
	web developer tips (30):在vs2008中Ajax Extender 控件UI与vs2005中差异 (0)
	web developer tips (21):为Developer Web Server设定固定端口 (1)
	web developer [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/05/19/tip-63-did-you-know-how-to-specify-a-fixed-port-for-visual-studio-development-server-while-using-waps.aspx" target="_blank">How to specify a fixed port for Visual Studio Development Server while using WAPs?</a></p>
<p>在<a href="http://www.watch-life.net/visual-studio/set-a-fixed-port-for-the-developer-web-server.html" target="_blank">web developer tips (21)</a>讲述在网站项目中为  Visual Studio 开发服务器 （Development Server） 设置固定的端口。本tips将讲述如何为web应用项目配置固定的发布端口（port ）。</p>
<p><a href="http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html" target="_blank">http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html</a></p>
<p>1、打开web应用项目的属性页。右键单击web应用项目，在上下文菜单选择“属性”，打开属性页<br />
<img title="PropertiesWAP" height="480" alt="PropertiesWAP" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/PropertiesWAP_thumb.jpg" width="252" /><br />
2、在属性页选择“web”标签<br />
3、在服务器选项里，选中“使用Visual Studio 开发服务器 ”项，选中“特定端口”并输入你想运行的端口<br />
<img title="WAP_PropertiesPage" height="221" alt="WAP_PropertiesPage" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/WAP_PropertiesPage_thumb.jpg" width="513" /></p>
<p>4、用浏览器查看页面，你将看到<a href="http://www.watch-life.net/category/visual-studio" target="_blank">Visual studio</a> 已经为开发服务器分配了你指定的端口<br />
<img title="SpecificPort" height="240" alt="SpecificPort" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/SpecificPort_thumb.jpg" width="508" /></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/how-to-sort-data-using-a-listview-control.html" title="web developer tips (7):在ListView控件里对数据排序 (2009-06-17)">web developer tips (7):在ListView控件里对数据排序</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-you-can-automatically-format-unformatted-html-on-paste-in-vs.html" title="web developer tips (59):粘贴时在VS中自动格式化HTML (2009-11-05)">web developer tips (59):粘贴时在VS中自动格式化HTML</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/add-intellisense-from-script-libraries-for-js-files.html" title="web developer tips (35):为js文件中的脚本库添加智能提示 (2009-08-14)">web developer tips (35):为js文件中的脚本库添加智能提示</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/ajax-extender-controls-ui-behaves-differently-in-vs-2008-than-in-vs-2005.html" title="web developer tips (30):在vs2008中Ajax Extender 控件UI与vs2005中差异 (2009-07-27)">web developer tips (30):在vs2008中Ajax Extender 控件UI与vs2005中差异</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/set-a-fixed-port-for-the-developer-web-server.html" title="web developer tips (21):为Developer Web Server设定固定端口 (2009-07-14)">web developer tips (21):为Developer Web Server设定固定端口</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/update-jscript-intellisense-manually.html" title="web developer tips (56):手动更新JScript的智能感知 (2009-10-29)">web developer tips (56):手动更新JScript的智能感知</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html" title="web developer tips (14):启动网站调试 (2009-07-02)">web developer tips (14):启动网站调试</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/the-list-of-asp-net-mvc-shortcuts.html" title="web developer tips (67):ASP.net MVC的快捷键列表 (2009-11-24)">web developer tips (67):ASP.net MVC的快捷键列表</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (60):如何对ASP.Net网站进行性能分析</title>
		<link>http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html</link>
		<comments>http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html#comments</comments>
		<pubDate>Thu, 05 Nov 2009 09:13:24 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[性能分析]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=466</guid>
		<description><![CDATA[原文地址：How to Profile an ASP.Net site?
1、使用Visual Studio Team Edition For Developers 创建一个Asp.netweb应用程序。
http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html 
2、在Page_Load方法里写如下代码




protected void&#160;Page_Load(objectsender,&#160;EventArgs&#160;e)&#160;
{&#160;
&#160;&#160;&#160;&#160;int&#160;sum
= 0;&#160;
&#160;&#160;&#160;&#160;for(int&#160;i
= 0; i &#60; 2000000; i++)&#160;
&#160;&#160;&#160; {&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; sum += i;&#160;
&#160;&#160;&#160; }&#160;
&#160;&#160;&#160; Response.Write(sum);&#160;
}

3、启动性能向导

4、选择当前应用，点击“下一步”

5、选择“采样”，点击“下一步”

6、单击“完成”.
7、在“性能资源管理器”中，选中“启动并启用分析功能”

8、将会启动IE，执行完后关闭IE。
9、vs将会性能分析报告摘要。

有关性能分析工具参见MSDN：
英文版：Getting Started with Profiling Tools
中文版：分析工具入门


	你可能也会喜欢以下文章：
	
	web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (0)
	web developer tips (72): 在Windows 7中使用IIS远程管理器 (0)
	web developer tips (9):在Web.config文件中注册web用户控件 (1)
	web developer tips (43):通过请求处理管道注册IHttpModule (0)
	web developer tips (29):在web应用项目里启用“编辑并继续”功能 (0)
	web developer [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/04/30/tip-60-did-you-know-how-to-profiling-an-asp-net-site.aspx" target="_blank">How to Profile an ASP.Net site?</a></p>
<p>1、使用Visual Studio Team Edition For Developers 创建一个<a href="http://www.watch-life.net/category/aspnet" target="_blank">Asp.net</a>web应用程序。</p>
<p><a href="http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html" target="_blank">http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html </a></p>
<p>2、在Page_Load方法里写如下代码</p>
<div class=code>
<p>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br />
<span class="Apple-style-span" style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 13px; "><br />
<span style="color: blue; ">protected void<span class="Apple-converted-space">&nbsp;</span></span>Page_Load(<span style="color: blue; ">object</span>sender,<span class="Apple-converted-space">&nbsp;</span><span style="color: rgb(43, 145, 175); ">EventArgs<span class="Apple-converted-space">&nbsp;</span></span>e)<span class="Apple-converted-space">&nbsp;</span><br />
{<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">int<span class="Apple-converted-space">&nbsp;</span></span>sum<br />
= 0;<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">for</span>(<span style="color: blue; ">int<span class="Apple-converted-space">&nbsp;</span></span>i<br />
= 0; i &lt; 2000000; i++)<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp; {<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sum += i;<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp; }<span class="Apple-converted-space">&nbsp;</span><br />
&nbsp;&nbsp;&nbsp; Response.Write(sum);<span class="Apple-converted-space">&nbsp;</span><br />
}</span></span></p>
</div>
<p>3、启动性能向导<br />
<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip60DidyouknowHowtoprofilingana.netsite_945F/image_thumb.png" width="506" height="238" /></p>
<p>4、选择当前应用，点击“下一步”<br />
<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip60DidyouknowHowtoprofilingana.netsite_945F/image4_thumb.png" width="525" height="392" /></p>
<p>5、选择“采样”，点击“下一步”<br />
<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip60DidyouknowHowtoprofilingana.netsite_945F/image14_thumb.png" width="529" height="395" /></p>
<p>6、单击“完成”.</p>
<p>7、在“性能资源管理器”中，选中“启动并启用分析功能”<br />
<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip60DidyouknowHowtoprofilingana.netsite_945F/image_thumb_3.png" width="341" height="219" /></p>
<p>8、将会启动IE，执行完后关闭IE。</p>
<p>9、vs将会<a href="http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html" target="_blank">性能分析</a>报告摘要。<br />
<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip60DidyouknowHowtoprofilingana.netsite_945F/image22_thumb.png" width="526" height="218" /></p>
<p>有关性能分析工具参见MSDN：<br />
英文版：<a href="http://msdn.microsoft.com/en-us/library/bb385749.aspx" target="_blank">Getting Started with Profiling Tools</a><br />
中文版：<a href="http://msdn.microsoft.com/zh-cn/library/bb385749.aspx" target="_blank">分析工具入门</a></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/new-style-builder-can-be-invoked-from-various-other-tool-windows-in-visual-web-developer.html" title="web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (2009-06-25)">web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/iis-remote-management-for-windows-7.html" title="web developer tips (72): 在Windows 7中使用IIS远程管理器 (2010-01-11)">web developer tips (72): 在Windows 7中使用IIS远程管理器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/register-your-asp-net-web-user-controls-in-web-config.html" title="web developer tips (9):在Web.config文件中注册web用户控件 (2009-06-18)">web developer tips (9):在Web.config文件中注册web用户控件</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/register-your-ihttpmodule-depends-on-the-pipeline.html" title="web developer tips (43):通过请求处理管道注册IHttpModule (2009-09-06)">web developer tips (43):通过请求处理管道注册IHttpModule</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-enable-edit-and-continue-feature-for-web-application-projects.html" title="web developer tips (29):在web应用项目里启用“编辑并继续”功能 (2009-07-23)">web developer tips (29):在web应用项目里启用“编辑并继续”功能</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/change-the-dynamicdata-folder-location.html" title="web developer tips (45):如何改变动态数据文件夹的位置 (2009-09-09)">web developer tips (45):如何改变动态数据文件夹的位置</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/microsoft-web-platform.html" title="web developer tips (27):Microsoft Web Platform (2009-07-20)">web developer tips (27):Microsoft Web Platform</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/no-premature-optimization.html" title="切勿过早优化 (2009-04-12)">切勿过早优化</a> (11)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (54):取消HTML/ CSS编辑器的智能提示</title>
		<link>http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html</link>
		<comments>http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 17:33:52 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[intellisense]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[智能提示]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=457</guid>
		<description><![CDATA[ 原文地址：How you can turn off intellisense for HTML/ CSS editors
如果你想关闭HTML编辑器（aspx,html 文件）和CSS编辑器（css文件）的智能提示(intellisense)功能，你可以这么做，通过Visual Studio菜单工具+选项打开“选项”对话框，进行设置。
http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html
对于HTML编辑器，通过菜单工具+选项+文本编辑器+HTML+常规，不选中“自动列出成员”和“参数信息”项。

对于CSS编辑器，通过菜单工具+选项+文本编辑器+CSS+常规，不选中“自动列出成员”和“参数信息”项。



	你可能也会喜欢以下文章：
	
	web developer tips (34)：在IIS7.0使用网址重写防止盗链 (1)
	web developer tips (56):手动更新JScript的智能感知 (0)
	web developer tips (68):附加样式表到网页 (0)
	web developer tips (33)：在vs2008里创建套嵌母版页 (1)
	web developer tips (28):CSS class 也支持“转到定义” (0)
	web developer tips (62):在vs工具箱添加AJAX控件工具包 (0)
	web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (0)
	web developer tips (61):如何创建Asp.net Dynamic Data网站 (0)


转载请注明作者，出处，以及原始超链接。评论数：0 &#124; 评论这篇文章&#124;关注作者最近动态,欢迎 follow me [...]]]></description>
			<content:encoded><![CDATA[<p> 原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/04/24/tip-54-did-you-know-how-you-can-turn-off-intellisense-for-html-css-editors.aspx" target="_blank">How you can turn off intellisense for HTML/ CSS editors</a></p>
<p>如果你想关闭HTML编辑器（aspx,html 文件）和CSS编辑器（css文件）的智能提示(intellisense)功能，你可以这么做，通过<a href="http://www.watch-life.net/category/visual-studio" target="_blank">Visual Studio</a>菜单<strong>工具+选项</strong>打开“选项”对话框，进行设置。</p>
<p><a href="http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html" target="_blank">http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html</a></p>
<p>对于HTML编辑器，通过菜单<strong>工具+选项+文本编辑器+HTML+常规</strong>，不选中“<strong>自动列出成员</strong>”和“<strong>参数信息</strong>”项。</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="clip_image002[4]" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip54DidyouknowHowyoucanturnoffintellise_D745/clip_image002%5B4%5D_thumb.jpg" width="244" border="0" /></p>
<p>对于CSS编辑器，通过菜单<strong>工具+选项+文本编辑器+CSS+常规</strong>，不选中“<strong>自动列出成员</strong>”和“<strong>参数信息</strong>”项。</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="clip_image004[4]" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip54DidyouknowHowyoucanturnoffintellise_D745/clip_image004%5B4%5D_thumb.jpg" width="244" border="0" /></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/stop-hot-linking-from-your-site-using-url-rewrite-in-iis-7-0.html" title="web developer tips (34)：在IIS7.0使用网址重写防止盗链 (2009-08-13)">web developer tips (34)：在IIS7.0使用网址重写防止盗链</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/update-jscript-intellisense-manually.html" title="web developer tips (56):手动更新JScript的智能感知 (2009-10-29)">web developer tips (56):手动更新JScript的智能感知</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-simple-it-is-to-attach-an-existing-style-sheet-to-your-web-page.html" title="web developer tips (68):附加样式表到网页 (2009-11-26)">web developer tips (68):附加样式表到网页</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/create-nested-master-pages-using-vs-2008.html" title="web developer tips (33)：在vs2008里创建套嵌母版页 (2009-08-11)">web developer tips (33)：在vs2008里创建套嵌母版页</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/go-to-definition-is-supported-for-css-class.html" title="web developer tips (28):CSS class 也支持“转到定义” (2009-07-22)">web developer tips (28):CSS class 也支持“转到定义”</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/add-ajax-control-toolkit-to-the-toolbox.html" title="web developer tips (62):在vs工具箱添加AJAX控件工具包 (2009-11-13)">web developer tips (62):在vs工具箱添加AJAX控件工具包</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/new-style-builder-can-be-invoked-from-various-other-tool-windows-in-visual-web-developer.html" title="web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (2009-06-25)">web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/create-an-asp-net-dynamic-data-web-site.html" title="web developer tips (61):如何创建Asp.net Dynamic Data网站 (2009-11-09)">web developer tips (61):如何创建Asp.net Dynamic Data网站</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (44):如何在Visual Studio中查看项目文件</title>
		<link>http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html</link>
		<comments>http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html#comments</comments>
		<pubDate>Tue, 08 Sep 2009 02:27:58 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[项目文件]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=444</guid>
		<description><![CDATA[原文地址：How to view the Project File while still in Visual Studio
如果你正在开发的网站是web应用,在这种模式下项目文件是构成整体所必需的部分。作为web应用项目的一部分这个一个文件必须包含在项目文件夹里，里面包含程序集的引用和其他项目元数据的设置。如果网站的文件系统的根目录存在一个文件，但不包含在项目文件，将不被视为项目的一部分，也不会包含在MSBuild的编译进程。
因此项目文件是如此重要，那么如何查看文件或手工编辑项目文件整个期间，仍然在Visual Studio里做到这一点。
方法如下：
http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html
1、菜单:工具+选项+项目和解决方案+常规，勾选“总是显示解决方案”选项。

2、在解决方案管理器，右键单击web应用项目节点，选择“卸载项目”

3、右键单击web应用项目（不可用），选择“编辑（项目名）”

4、这个时候，在编辑器里显示项目文件，可以查看和编辑。一旦完成，右键项目节点，选择“重新加载项目”。

5、将会出现一个对话框，指出该项目文件已经打开，并询问是否关闭？选择“是”就会关闭项目文件，并重新加载web应用项目。如果回答“否”，将不会关闭打开的项目文件，也不重新加载web应用项目。
 


	你可能也会喜欢以下文章：
	
	web developer tips (67):ASP.net MVC的快捷键列表 (0)
	web developer tips (26):在 App_Code目录下同时放c#和VB.NET文件 (0)
	web developer tips (46):使用Web Deployment Tool进行Web部署迁移 (0)
	web developer tips (8):创建web用户控件并包含在web页面里 (1)
	web developer tips (32)：轻松地创建自己的项目模板 (0)
	web developer tips (41):用自颁发的证书连接到远程IIS服务器 (0)
	web developer tips (65): 快速创建一个挂接SQL表的GridView (0)
	web developer tips (5):绑定ListView控件 (1)


转载请注明作者，出处，以及原始超链接。评论数：2 &#124; 评论这篇文章&#124;关注作者最近动态,欢迎 follow me xjb@twitter.com&#124;联络作者：iamxjb@gmail.com© [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/01/29/tip-44-did-you-know-how-to-view-the-project-file-while-still-in-visual-studio.aspx" target="_blank">How to view the Project File while still in Visual Studio</a></p>
<p>如果你正在开发的网站是<a href="http://msdn.microsoft.com/en-us/asp.net/aa336618.aspx" target="_blank">web应用</a>,在这种模式下项目文件是构成整体所必需的部分。作为web应用项目的一部分这个一个文件必须包含在项目文件夹里，里面包含程序集的引用和其他项目元数据的设置。如果网站的文件系统的根目录存在一个文件，但不包含在项目文件，将不被视为项目的一部分，也不会包含在MSBuild的编译进程。</p>
<p>因此项目文件是如此重要，那么如何<a href="http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html" target="_blank">查看文件或手工编辑项目文件</a>整个期间，仍然在Visual Studio里做到这一点。</p>
<p>方法如下：<br />
<a href="http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html" target="_blank">http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html</a></p>
<p>1、菜单:工具+选项+项目和解决方案+常规，勾选“总是显示解决方案”选项。<br />
<img title="ToolsOptions" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="143" alt="ToolsOptions" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip44DidyouknowHowtoviewtheProjectFilewh_A333/ToolsOptions_thumb_1.jpg" width="244" border="0" /></p>
<p>2、在解决方案管理器，右键单击web应用项目节点，选择“卸载项目”<br />
<img title="UnloadProject" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="UnloadProject" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip44DidyouknowHowtoviewtheProjectFilewh_A333/UnloadProject_thumb.jpg" width="161" border="0" /></p>
<p>3、右键单击web应用项目（不可用），选择“编辑（项目名）”<br />
<img title="EditProj" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="EditProj" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip44DidyouknowHowtoviewtheProjectFilewh_A333/EditProj_thumb.jpg" width="199" border="0" /></p>
<p>4、这个时候，在编辑器里显示项目文件，可以查看和编辑。一旦完成，右键项目节点，选择“重新加载项目”。<br />
<img title="ReloadProject" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="ReloadProject" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip44DidyouknowHowtoviewtheProjectFilewh_A333/ReloadProject_thumb.jpg" width="210" border="0" /></p>
<p>5、将会出现一个对话框，指出该项目文件已经打开，并询问是否关闭？选择“是”就会关闭项目文件，并重新加载web应用项目。如果回答“否”，将不会关闭打开的项目文件，也不重新加载web应用项目。</p>
<p><img title="question" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="92" alt="question" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip44DidyouknowHowtoviewtheProjectFilewh_A333/question_thumb.jpg" width="244" border="0" /></a> </p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/the-list-of-asp-net-mvc-shortcuts.html" title="web developer tips (67):ASP.net MVC的快捷键列表 (2009-11-24)">web developer tips (67):ASP.net MVC的快捷键列表</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/have-c-and-vb-net-files-inside-your-app-code-directory.html" title="web developer tips (26):在 App_Code目录下同时放c#和VB.NET文件 (2009-07-19)">web developer tips (26):在 App_Code目录下同时放c#和VB.NET文件</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/web-deployment-migrate-operation.html" title="web developer tips (46):使用Web Deployment Tool进行Web部署迁移 (2009-09-11)">web developer tips (46):使用Web Deployment Tool进行Web部署迁移</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-create-an-asp-net-web-user-control-and-include-it-in-your-web-page.html" title="web developer tips (8):创建web用户控件并包含在web页面里 (2009-06-17)">web developer tips (8):创建web用户控件并包含在web页面里</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-easily-create-your-own-project-templates.html" title="web developer tips (32)：轻松地创建自己的项目模板 (2009-08-03)">web developer tips (32)：轻松地创建自己的项目模板</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/establishing-a-remote-connection-to-a-iis-server-with-self-issued-certificate.html" title="web developer tips (41):用自颁发的证书连接到远程IIS服务器 (2009-09-02)">web developer tips (41):用自颁发的证书连接到远程IIS服务器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/quickly-create-a-gridview-that-is-hooked-up-to-a-sql-table.html" title="web developer tips (65): 快速创建一个挂接SQL表的GridView (2009-11-19)">web developer tips (65): 快速创建一个挂接SQL表的GridView</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-databind-a-listview-control.html" title="web developer tips (5):绑定ListView控件 (2009-06-12)">web developer tips (5):绑定ListView控件</a> (1)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：2 | <b><a href='http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>web developer tips (4):在Visual Web Developer中增加浏览器</title>
		<link>http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html</link>
		<comments>http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html#comments</comments>
		<pubDate>Tue, 09 Jun 2009 10:27:16 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[浏览器]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=370</guid>
		<description><![CDATA[原文链接：You can add browsers to Visual Web Developer using the “Browse With…” option
作为一个web程序开发人员最有趣的一件事是：可以在不同的浏览器去查看页面。也可以在Visual Studio中来实现使用不同的浏览器来查看页面。
设置步骤如下：
http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html
1、在web项目中，选中一个页面（aspx），右键在上下文菜单中选择“浏览方式&#8230;”

2、在“浏览方式”对话框中，单击“添加”按钮

选择你要用来查看页面的浏览器，比如Firefox

这样就可以通过Firefox来浏览开发的页面了。
这个功能对于Visual Studio这样超级开发工具来说算不上什么高技术含量的功能，但我想对web程序开发来说，应该还算比较实用的。
不过对于web程序程序员来说，要做适用各种浏览器的web程序确实是一件比较痛苦的事。:)


	你可能也会喜欢以下文章：
	
	web developer tips (54):取消HTML/ CSS编辑器的智能提示 (0)
	web developer tips (64): 在GridView中转换BoundField为TemplateField (0)
	兼容多种浏览器“复制到剪贴板”的解决方案 (4)
	切勿过早优化 (11)
	web developer tips (44):如何在Visual Studio中查看项目文件 (2)
	Visual Studio 2008 每日提示(三十五) (0)
	Google Chrome 会是IE的终结者么？ (5)
	对Google chrome OS 有点失望 (5)


转载请注明作者，出处，以及原始超链接。评论数：3 &#124; 评论这篇文章&#124;关注作者最近动态,欢迎 follow me xjb@twitter.com&#124;联络作者：iamxjb@gmail.com© 2010 守望轩 www.watch-life.net]]></description>
			<content:encoded><![CDATA[<p>原文链接：<a href="http://blogs.msdn.com/webdevelopertips/archive/2008/08/11/tip-4-did-you-know-you-can-add-browsers-to-visual-web-developer-using-the-browse-with-option.aspx" target="_blank">You can add browsers to Visual Web Developer using the “Browse With…” option</a></p>
<p>作为一个web程序开发人员最有趣的一件事是：可以在不同的浏览器去查看页面。也可以在<a href="http://www.watch-life.net/category/visual-studio" target="_blank">Visual Studio</a>中来实现使用不同的浏览器来查看页面。</p>
<p>设置步骤如下：<br />
<a href="http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html" target="_blank">http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html</a></p>
<p>1、在web项目中，选中一个页面（aspx），右键在上下文菜单中选择“<strong>浏览方式&#8230;</strong>”<br />
<a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/PageContextMenu_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/PageContextMenu_2.jpg"><img title="PageContextMenu" height="480" alt="PageContextMenu" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/PageContextMenu_thumb.jpg" width="312" align="right" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/PageContextMenu_thumb.jpg" /></a></p>
<p>2、在“浏览方式”对话框中，单击“添加”按钮</p>
<p><a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Browse%20With%20Dialog_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Browse%20With%20Dialog_2.jpg"><img title="Browse With Dialog" height="345" alt="Browse With Dialog" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Browse%20With%20Dialog_thumb.jpg" width="461" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Browse%20With%20Dialog_thumb.jpg" /></a></p>
<p>选择你要用来查看页面的浏览器，比如<a href="http://www.mozillaonline.com/" target="_blank">Firefox</a></p>
<p><a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Add%20Program%20Dialog_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Add%20Program%20Dialog_2.jpg"><img title="Add Program Dialog" height="155" alt="Add Program Dialog" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Add%20Program%20Dialog_thumb.jpg" width="414" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip4DidyouknowYoucanViewyourpageHowtovie_BE9E/Add%20Program%20Dialog_thumb.jpg" /></a></p>
<p>这样就可以通过<a href="http://www.watch-life.net/tag/Firefox" rel="tag" target="_blank">Firefox</a>来浏览开发的页面了。</p>
<p>这个功能对于Visual Studio这样超级开发工具来说算不上什么高技术含量的功能，但我想对web程序开发来说，应该还算比较实用的。</p>
<p>不过对于web程序程序员来说，要做适用各种浏览器的web程序确实是一件比较痛苦的事。:)</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html" title="web developer tips (54):取消HTML/ CSS编辑器的智能提示 (2009-10-14)">web developer tips (54):取消HTML/ CSS编辑器的智能提示</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html" title="web developer tips (64): 在GridView中转换BoundField为TemplateField (2009-11-18)">web developer tips (64): 在GridView中转换BoundField为TemplateField</a> (0)</li>
	<li><a href="http://www.watch-life.net/javascript/copy-to-clipboard-solution.html" title="兼容多种浏览器“复制到剪贴板”的解决方案 (2009-03-05)">兼容多种浏览器“复制到剪贴板”的解决方案</a> (4)</li>
	<li><a href="http://www.watch-life.net/life-thinking/no-premature-optimization.html" title="切勿过早优化 (2009-04-12)">切勿过早优化</a> (11)</li>
	<li><a href="http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html" title="web developer tips (44):如何在Visual Studio中查看项目文件 (2009-09-08)">web developer tips (44):如何在Visual Studio中查看项目文件</a> (2)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html" title="Visual Studio 2008 每日提示(三十五) (2009-04-02)">Visual Studio 2008 每日提示(三十五)</a> (0)</li>
	<li><a href="http://www.watch-life.net/googleapp/google-chrome-ie-terminator.html" title="Google Chrome 会是IE的终结者么？ (2008-09-03)">Google Chrome 会是IE的终结者么？</a> (5)</li>
	<li><a href="http://www.watch-life.net/googleapp/google-chrome-os-a-bit-disappointed.html" title="对Google chrome OS 有点失望 (2009-11-23)">对Google chrome OS 有点失望</a> (5)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：3 | <b><a href='http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/add-browsers-to-visual-web-developer-using-the-browse-with-option.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>切勿过早优化</title>
		<link>http://www.watch-life.net/life-thinking/no-premature-optimization.html</link>
		<comments>http://www.watch-life.net/life-thinking/no-premature-optimization.html#comments</comments>
		<pubDate>Sun, 12 Apr 2009 15:04:23 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[随思偶得]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[premature optimization]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[拖拉]]></category>
		<category><![CDATA[时间管理]]></category>
		<category><![CDATA[浮躁]]></category>
		<category><![CDATA[计划]]></category>
		<category><![CDATA[过早优化]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=306</guid>
		<description><![CDATA[Donald Knuth说“过早优化是万恶之源”（premature optimization is the root of all evil）。这话也许有些夸张，但“过早优化”的危害我觉得不能忽视。同时，我觉得“过早优化”的概念不专属编写程序，生活中的示例也比比皆是。不信，你看看下面这些情形你是否遇到过：
 http://www.watch-life.net/life-thinking/no-premature-optimization.html
1、当你开始学一门程序语言的时候（比如c#），你想如果可以精通开发工具（比如Visual Studio）一定如虎添翼，于是一开始你就花很多时间去研究开发工具，而忘记自己学习的重点是语言本身，而非工具。或者，一开始，你花不少的时间去选择哪门程序语言，比较各种语言的优劣，在五花八门的语言前面犹豫不决，这个想学，那个也不想放弃，结果都是学个半路子。
2、当你学习一门外语比如英语的时候，一开始，你花了很多的时间去下载有关英语资料，花了很多的时间去找英语书籍，以为有了这些资料和书籍就可以学好英文，而不是一开始就踏踏实实的从单词、语法开始，结果后来资料下载了一大堆，书籍买了不少，却没有坚持下去。
3、你想搞体育锻炼，比如打羽毛球，于是一开始你花大量时间去买球衣、球鞋、球拍等装备，可没连几天，你发现自己开始三天打鱼了，最后，那些装备都起了灰，也没锻炼几次。
4、你想做时间管理(Getting Things Done),于是你研究各种时间管理的资料，上各种时间管理技巧的网站，比如lifehack、 digg 、gtdlife，下载对最流行的GTD的管理软件，以节省时间的名义浪费时间，很浮躁，不能做到实实在在把每天的计划都落实,拖拖拉拉。
5、你有没有这样的体验，一本书你总是对开头的部分看的最仔细，后面的章节没坚持看下去，下次又重复这种循环。当你计划做一件事的时候，总是规划的非常完美，几乎考虑每个细节，但却没有认认真真、一步一步执行，或者过早完美计划，反而让你缩手缩脚，犹豫不前，瞻前顾后，顾此失彼，最后虎头蛇尾。
6、比如，如果我有了钱，我就如何如何享受快乐，比如，如果我将来有了很多的时间，我就会花更多的时间陪家人或锻炼&#8230;
这样类似的例子还可以举很多。
过早优化对大的问题在于：过早关注不重要的部分，而忽略行动和目标本身。以静态的思维来优化，殊不知，事务发展总是动态的，“优化”是需要长期的实践积累才可以获得。出发点是好的，但往往好心办坏事，折腾大量的时间，做了很多不该做的，而该做的、重要的反而没做。强化外部条件、工具等外在，而忽略内在因素和行动本身，或者，过多期望将来，而忽略当下眼前。
活在当下，实实在在做好手头的事，是避免“过早优化”最好的方法之一。


	你可能也会喜欢以下文章：
	
	web developer tips (54):取消HTML/ CSS编辑器的智能提示 (0)
	web developer tips (64): 在GridView中转换BoundField为TemplateField (0)
	摆脱阅读黑洞，退订RSS (9)
	happy 牛 year (4)
	我的浮躁 (2)
	web developer tips (60):如何对ASP.Net网站进行性能分析 (0)
	最好的自己 (2)
	厦门印象之南普陀寺 (3)


转载请注明作者，出处，以及原始超链接。评论数：11 &#124; 评论这篇文章&#124;关注作者最近动态,欢迎 follow me xjb@twitter.com&#124;联络作者：iamxjb@gmail.com© 2010 守望轩 www.watch-life.net]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Donald_Knuth" target="_blank">Donald Knuth</a>说“<strong>过早优化是万恶之源</strong>”（premature optimization is the root of all evil）。这话也许有些夸张，但“<strong><a href="http://www.watch-life.net/life-thinking/no-premature-optimization.html" target="_blank">过早优化</a></strong>”的危害我觉得不能忽视。同时，我觉得“过早优化”的概念不专属编写程序，生活中的示例也比比皆是。不信，你看看下面这些情形你是否遇到过：</p>
<p> <a href="http://www.watch-life.net/life-thinking/no-premature-optimization.html" target="_blank">http://www.watch-life.net/life-thinking/no-premature-optimization.html</a></p>
<p>1、当你开始学一门程序语言的时候（比如<a href="http://www.watch-life.net/category/csharp" target="_blank">c#</a>），你想如果可以精通开发工具（比如<a href="http://www.watch-life.net/category/visual-studio" target="_blank">Visual Studio</a>）一定如虎添翼，于是一开始你就花很多时间去研究开发工具，而忘记自己学习的重点是语言本身，而非工具。或者，一开始，你花不少的时间去选择哪门程序语言，比较各种语言的优劣，在五花八门的语言前面犹豫不决，这个想学，那个也不想放弃，结果都是学个半路子。</p>
<p>2、当你学习一门外语比如英语的时候，一开始，你花了很多的时间去下载有关英语资料，花了很多的时间去找英语书籍，以为有了这些资料和书籍就可以学好英文，而不是一开始就踏踏实实的从单词、语法开始，结果后来资料下载了一大堆，书籍买了不少，却没有坚持下去。</p>
<p>3、你想搞体育锻炼，比如打羽毛球，于是一开始你花大量时间去买球衣、球鞋、球拍等装备，可没连几天，你发现自己开始三天打鱼了，最后，那些装备都起了灰，也没锻炼几次。</p>
<p>4、你想做时间管理(Getting Things Done),于是你研究各种时间管理的资料，上各种时间管理技巧的网站，比如<a href="http://lifehacker.com/" target="_blank">lifehack</a>、 <a href="http://digg.com/" target="_blank">digg</a> 、<a href="http://www.gtdlife.cn/" target="_blank">gtdlife</a>，下载对最流行的GTD的管理软件，<a href="http://www.watch-life.net/bbs/thread-2342-1-1.html" target="_blank">以节省时间的名义浪费时间</a>，很浮躁，不能做到实实在在把每天的计划都落实,拖拖拉拉。</p>
<p>5、你有没有这样的体验，一本书你总是对开头的部分看的最仔细，后面的章节没坚持看下去，下次又重复这种循环。当你计划做一件事的时候，总是规划的非常完美，几乎考虑每个细节，但却没有认认真真、一步一步执行，或者过早完美计划，反而让你缩手缩脚，犹豫不前，瞻前顾后，顾此失彼，最后虎头蛇尾。</p>
<p>6、比如，如果我有了钱，我就如何如何享受快乐，比如，如果我将来有了很多的时间，我就会花更多的时间陪家人或锻炼&#8230;</p>
<p>这样类似的例子还可以举很多。</p>
<p>过早优化对大的问题在于：过早关注不重要的部分，而忽略行动和目标本身。以静态的思维来优化，殊不知，事务发展总是动态的，“优化”是需要长期的实践积累才可以获得。出发点是好的，但往往好心办坏事，折腾大量的时间，做了很多不该做的，而该做的、重要的反而没做。强化外部条件、工具等外在，而忽略内在因素和行动本身，或者，过多期望将来，而忽略当下眼前。</p>
<p><strong>活在当下，实实在在做好手头的事，是避免“过早优化”最好的方法之一</strong>。</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/turn-off-intellisense-for-html-css-editors.html" title="web developer tips (54):取消HTML/ CSS编辑器的智能提示 (2009-10-14)">web developer tips (54):取消HTML/ CSS编辑器的智能提示</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/convert-a-gridview-column-from-boundfield-to-templatefield.html" title="web developer tips (64): 在GridView中转换BoundField为TemplateField (2009-11-18)">web developer tips (64): 在GridView中转换BoundField为TemplateField</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/exit-rss.html" title="摆脱阅读黑洞，退订RSS (2008-07-30)">摆脱阅读黑洞，退订RSS</a> (9)</li>
	<li><a href="http://www.watch-life.net/visual-studio/2009-happy-news-year.html" title="happy 牛 year (2008-12-31)">happy 牛 year</a> (4)</li>
	<li><a href="http://www.watch-life.net/life-thinking/my-flippancy.html" title="我的浮躁 (2008-07-18)">我的浮躁</a> (2)</li>
	<li><a href="http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html" title="web developer tips (60):如何对ASP.Net网站进行性能分析 (2009-11-05)">web developer tips (60):如何对ASP.Net网站进行性能分析</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/i-am-best.html" title="最好的自己 (2008-11-22)">最好的自己</a> (2)</li>
	<li><a href="http://www.watch-life.net/life-thinking/xiamen-impression-3.html" title="厦门印象之南普陀寺 (2009-11-25)">厦门印象之南普陀寺</a> (3)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：11 | <b><a href='http://www.watch-life.net/life-thinking/no-premature-optimization.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/life-thinking/no-premature-optimization.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/life-thinking/no-premature-optimization.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 每日提示(三十五)</title>
		<link>http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html</link>
		<comments>http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html#comments</comments>
		<pubDate>Wed, 01 Apr 2009 16:22:21 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[内容安装]]></category>
		<category><![CDATA[类视图]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=341</guid>
		<description><![CDATA[本篇包括tip351-tip360
http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html
#351、在类视图里查看类关系图
原文链接：You can view the Class Diagram for a class from the Class View
操作步骤：
在类视图里，有个查看类关系图的图标按钮

单击这个图标，可以添加一个类的关系模型，或者，如果没有建立关系图就会建立它。

也可以通过“类视图上下文菜单.类视图项.查看类关系图”命令来查看类关系图。
评论：这个功能对系统设计非常有用。
#352、在类视图里调用静态方法
原文链接：You can Invoke a Static Method from the Class View
http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html
操作步骤：
&#8220;创建实例&#8221;和“调用静态方法”是类视图执行的一部分。

运行调用静态方法命令，调用“ SayHello()”方法。运行方法时有个确认的对话框。

按“确定”按钮，出现命令行窗口

下面是运行成功的结果

如果运行失败，会有如下提示

评论：这个功能有些像单元测试，用来测试实例方法或静态方法的运行状况。
#353、从类视图拖拽对象到你的代码
原文链接：You can drag and drop objects from the Class View into your code
操作步骤：
如果你需要调用某个方法，如果不想输入的话，可以直接从对象浏览器拖拽方法到代码里，如下图所示

评论：这个方法真方便，以前还真不知知道呢，以后要多试试了。
#354、按 Ctrl+\, D查看代码定义窗口
原文链接：You can press Ctrl+\, D to view the Code Definition Window
操作步骤：
在快捷键的全局设置里，“ Ctrl+\, D”是打开代码定义窗口。对应的命令为：视图.代码定义窗

评论：这个快捷键我用的比较多。我测试了一下发现在不同的键盘映射方案，这个快捷键是通用的。
#355 、Visual Studio的内容安装
原文链接：Visual Studio has a Content [...]]]></description>
			<content:encoded><![CDATA[<p>本篇包括tip351-tip360<br />
<a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html">http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html</a></p>
<h2>#351、在类视图里查看类关系图</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/06/did-you-know-you-can-view-the-class-diagram-for-a-class-from-the-class-view-351.aspx" target="_blank">You can view the Class Diagram for a class from the Class View</a></p>
<p><strong>操作步骤：</strong><br />
在类视图里，有个查看类关系图的图标按钮</p>
<p><img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanviewtheClassDiagramforac_11D81/image_thumb.png" alt="" border="0"/></p>
<p>单击这个图标，可以添加一个类的关系模型，或者，如果没有建立关系图就会建立它。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanviewtheClassDiagramforac_11D81/image_thumb_2.png" alt="" border="0"/></p>
<p>也可以通过“类视图上下文菜单.类视图项.查看类关系图”命令来查看类关系图。</p>
<p><font color="red"><strong>评论：这个功能对系统设计非常有用。</strong></font></p>
<h2>#352、在类视图里调用静态方法</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/07/did-you-know-you-can-invoke-a-static-method-from-the-class-view-352.aspx" target="_blank">You can Invoke a Static Method from the Class View</a></p>
<p><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html" target="_blank">http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html</a></p>
<p><strong>操作步骤：</strong><br />
&#8220;创建实例&#8221;和“调用静态方法”是类视图执行的一部分。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanInvokeaStaticMethodfromt_12211/image_thumb_2.png" alt="" border="0"/><br />
运行调用静态方法命令，调用“ SayHello()”方法。运行方法时有个确认的对话框。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanInvokeaStaticMethodfromt_12211/image_thumb_3.png" alt="" border="0"/></p>
<p>按“确定”按钮，出现命令行窗口<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanInvokeaStaticMethodfromt_12211/image_thumb_4.png" alt="" border="0"/></p>
<p>下面是运行成功的结果<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanInvokeaStaticMethodfromt_12211/image_thumb_5.png" alt="" border="0"/></p>
<p>如果运行失败，会有如下提示<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanInvokeaStaticMethodfromt_12211/image_thumb_6.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：这个功能有些像单元测试，用来测试实例方法或静态方法的运行状况。</strong></font></p>
<h2>#353、从类视图拖拽对象到你的代码</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/10/did-you-know-you-can-drag-and-drop-objects-from-the-class-view-into-your-code-353.aspx" target="_blank">You can drag and drop objects from the Class View into your code</a></p>
<p><strong>操作步骤：</strong><br />
如果你需要调用某个方法，如果不想输入的话，可以直接从对象浏览器拖拽方法到代码里，如下图所示<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucandraganddropobjectsfromth_125A2/image_thumb.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：这个方法真方便，以前还真不知知道呢，以后要多试试了。</strong></font></p>
<h2>#354、按 Ctrl+\, D查看代码定义窗口</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/11/did-you-know-you-can-press-ctrl-d-to-view-the-code-definition-window-354.aspx" target="_blank">You can press Ctrl+\, D to view the Code Definition Window</a></p>
<p><strong>操作步骤：</strong><br />
在快捷键的全局设置里，“ <strong>Ctrl+\, D</strong>”是打开代码定义窗口。对应的命令为：<strong>视图.代码定义窗</strong></p>
<p><img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanpressCtrlDtoviewtheCodeD_129A7/image_thumb.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：这个快捷键我用的比较多。我测试了一下发现在不同的键盘映射方案，这个快捷键是通用的。</strong></font></p>
<h2>#355 、Visual Studio的内容安装</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/12/did-you-know-visual-studio-has-a-content-installer-355.aspx" target="_blank">Visual Studio has a Content Installer</a></p>
<p><strong>操作步骤：</strong><br />
Visual Studio 内容被打包在一个zip文件里，并重命名为“<strong>.vsi</strong>”，如下图标<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowVisualStudiohasaContentInstall_14FE1/image_thumb_1.png" alt="" border="0"/></p>
<p>如果双击，将会启动Visual Studio的内容安装<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowVisualStudiohasaContentInstall_14FE1/image_thumb.png" alt="" border="0"/></p>
<p>在一个 .vsi 文件里包含：<br />
1、.vscontent文件<br />
2、内容文件（包括 myaddin.dll, myaddin.addin, mysnippet.snippet等文件）</p>
<p>在安装完成向导后，你会得到每一个内容的（安装成功与否的）确认。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowVisualStudiohasaContentInstall_14FE1/image_thumb_2.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：关于如何打包内容安装，可以参考：<a href="http://msdn.microsoft.com/zh-cn/library/ms246580.aspx" target="_blank">http://msdn.microsoft.com/zh-cn/library/ms246580.aspx</a></strong></font></p>
<h2>#356 、在内容安装里指定安装代码块</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/13/did-you-know-you-can-specify-where-to-install-a-snippet-in-the-content-installer-356.aspx" target="_blank">You can specify where to install a snippet in the Content Installer</a></p>
<p><strong>操作步骤：</strong><br />
代码块（ code snippet）是被打包在Visual Studio内容安装文件里的。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanspecifywheretoinstallasn_15122/image_thumb_1.png" alt="" border="0"/></p>
<p>安装完成后，你可以查看代码块被安装在什么位置</p>
<p><img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowYoucanspecifywheretoinstallasn_15122/image_thumb_2.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：有关Visual Studio的内容安装，可以参考：<a href="http://msdn.microsoft.com/zh-cn/library/aa992029.aspx" target="_blank">http://msdn.microsoft.com/zh-cn/library/aa992029.aspx</a></strong></font></p>
<h2># 357、在安装前，查看.vsi文件里的安装内容</h2>
<p>原文链接： <a href="http://blogs.msdn.com/saraford/archive/2008/11/14/did-you-know-you-can-view-the-contents-of-a-vsi-before-installing-via-the-content-installer-357.aspx" target="_blank">You can view the contents of a .vsi before installing via the Content Installer</a></p>
<p><strong>操作步骤：</strong><br />
在内容安装的最开始的页面，有个“在windows资源管理器查内容”链接。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.vsibeforeinstallingviatheContentInst_253/image_thumb_1.png" alt="" border="0"/></p>
<p>如果单击这个链接，windows资源管理器会打开一个临时目录，在这个目录是.vsi解压后的文件。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.vsibeforeinstallingviatheContentInst_253/image_thumb_2.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：这个很细微的功能，我还真没注意。</strong></font></p>
<h2>#358 、在内容安装里显示许可信息</h2>
<p>原文链接： <a href="http://blogs.msdn.com/saraford/archive/2008/11/17/did-you-know-you-can-display-a-license-in-the-content-installer-358.aspx" target="_blank">you can display a license in the Content Installer</a></p>
<p><strong>操作步骤：</strong><br />
在内容安装里嵌入许可信息后，在安装.vsi文件是，将会出现“最终用户许可协议”的对话框。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowyoucandisplayalicenseintheCont_51D/image_thumb.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：如果你自己编写有关代码块，如果公开下载可以考虑在内容安装里加一个授权信息。</strong></font></p>
<h2># 359、按快捷键Ctrl+.(句点)显示智能标记</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/18/did-you-know-ctrl-shows-a-smart-tag-359.aspx" target="_blank">Ctrl+. shows a smart tag</a></p>
<p><strong>操作步骤：</strong><br />
在智能标记前，如果想重命名或vs想帮我们添加using语句，会出现一小段线。</p>
<p><img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowCtrl.showsasmarttag359_112BE/image_thumb_2.png" alt="" border="0"/></p>
<p>在编辑器里，有两个智能标记的快捷键： <strong>Ctrl+.</strong>和 <strong>Alt+Shift+F10</strong><br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowCtrl.showsasmarttag359_112BE/image_thumb_4.png" alt="" border="0"/></p>
<p>也可以用命令：<strong>视图.显示智能</strong>来查看。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/DidyouknowCtrl.showsasmarttag359_112BE/image_thumb.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：如果这个快捷键不用的话，简直无法体验vs的方便了。</strong></font></p>
<h2># 360、使用“devenv.exe /edit ”命令在一个已经存在的vs实例里打开文件</h2>
<p>原文链接：<a href="http://blogs.msdn.com/saraford/archive/2008/11/19/did-you-know-you-can-use-devenv-exe-edit-to-open-a-file-in-an-existing-visual-studio-instance-360.aspx" target="_blank">You can use devenv.exe /edit to open a file in an existing Visual Studio instance</a></p>
<p><strong>操作步骤：</strong><br />
运行命令：<strong>devenv /edit <filename></strong>，可以在IDE里打开文件。<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.exeedittoopenafileinanexistingVisual_122C3/image_thumb.png" alt="" border="0"/><br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.exeedittoopenafileinanexistingVisual_122C3/image_thumb_1.png" alt="" border="0"/></p>
<p>你也可以创建一个cmd文件，例如VSEdit.cmd，在文件里（可以用记事本）写如下内容：<br />
@&#8221;devenv.exe&#8221; /edit %*</p>
<p>如果你的path环境变量里包括了“%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE ”，你可以VSEdit.cmd放到这个目录，可以把它放到path环境变量包括的目录。这样就可以直接在命令行下执行<br />
<img src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.exeedittoopenafileinanexistingVisual_122C3/image_thumb_3.png" alt="" border="0"/></p>
<p><font color="red"><strong>评论：用命令行和快捷键是作者两大爱好。</strong></font></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/how-to-create-an-asp-net-web-user-control-and-include-it-in-your-web-page.html" title="web developer tips (8):创建web用户控件并包含在web页面里 (2009-06-17)">web developer tips (8):创建web用户控件并包含在web页面里</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-3.html" title="Visual Studio 2008 每日提示(三) (2008-12-05)">Visual Studio 2008 每日提示(三)</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/insert-quotes-values-automatically-while-typing-the-attrib-values.html" title="web developer tips (66):输入属性时自动插入引号 (2009-11-19)">web developer tips (66):输入属性时自动插入引号</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/powerful-css-tools-to-create-manage-and-apply-styles.html" title="web developer tips (1):创建、管理、应用样式表的强大工具 (2009-05-19)">web developer tips (1):创建、管理、应用样式表的强大工具</a> (2)</li>
	<li><a href="http://www.watch-life.net/visual-studio/use-vsual-studio-2008-develop-php.html" title="使用Visual Studio 2008 开发php程序 (2009-01-21)">使用Visual Studio 2008 开发php程序</a> (5)</li>
	<li><a href="http://www.watch-life.net/it-review/visual-studio-2008-ambition.html" title="&#8220;Visual Studio 2008&#8243;背后的勃勃野心 (2008-02-10)">&#8220;Visual Studio 2008&#8243;背后的勃勃野心</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-6.html" title="Visual Studio 2008 每日提示(六) (2008-12-09)">Visual Studio 2008 每日提示(六)</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-28.html" title="Visual Studio 2008 每日提示(二十八) (2009-01-12)">Visual Studio 2008 每日提示(二十八)</a> (1)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-35.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
