<?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/category/visual-studio/feed" rel="self" type="application/rss+xml" />
	<link>http://www.watch-life.net</link>
	<description>关注IT,审视自我,守望生活, 宁静雅致的小轩馆.</description>
	<lastBuildDate>Mon, 23 Aug 2010 15:08:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>web developer tips (84):在Visual Web Developer中设置web网站的起始页</title>
		<link>http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html</link>
		<comments>http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html#comments</comments>
		<pubDate>Mon, 29 Mar 2010 15:52:33 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Visual Web Developer]]></category>
		<category><![CDATA[web developer tips]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=515</guid>
		<description><![CDATA[原文地址：How to set a Start page for your Web Site in Visual Web Developer? 如果你正在开发网站，为了测试网站你想启动某个特定的网页。默认的情况下，当你启动调试的时候，Visual Studio 2008运行的页面是设计器中当前激活的页面。 http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html 如果这个设置的网页，是Visual web Developer将启动网站设置的网页，同时不是当前设计器的页面。右键单击这个网页，从上下文菜单中选择“设置起始页”项。 也可以在项目的属性页对话框中选择“启动选项”标签，如下图所示，在“启动操作”项选中“特定页”，然后浏览设置你想启动的页面。 你可能也会喜欢以下文章： web developer tips (5):绑定ListView控件 (1) web developer tips (23):两次单击启动编辑器的格式对话框 (0) Visual Studio 2008 每日提示(五) (1) web developer tips (58):在vs里导入导出每一个HTML的标记 (0) Visual Studio 2008 每日提示(十一) (0) web developer tips (63): 在web应用项目指定vs开发服务器端口 (0) web [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/26/tip-84-did-you-know-how-to-set-a-start-page-for-your-web-site-in-visual-web-developer.aspx" target="_blank">How to set a Start page for your Web Site in Visual Web Developer?</a></p>
<p>如果你正在开发网站，为了测试网站你想启动某个特定的网页。默认的情况下，当你启动调试的时候，Visual Studio 2008运行的页面是设计器中当前激活的页面。<br />
<a href="http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html" target="_blank">http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html</a></p>
<p>如果这个设置的网页，是Visual web Developer将启动网站设置的网页，同时不是当前设计器的页面。右键单击这个网页，从上下文菜单中选择“<a href="http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html" target="_blank">设置起始页</a>”项。</p>
<p><img title="Set as Start Page" height="317" alt="Set as Start Page" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip84DidyouknowHowtosetaStartpageforyour_DD64/Set%20as%20Start%20Page_thumb.jpg" width="300" /><br />
也可以在项目的属性页对话框中选择“启动选项”标签，如下图所示，在“启动操作”项选中“特定页”，然后浏览设置你想启动的页面。<br />
<img title="StartOptions" height="364" alt="StartOptions" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip84DidyouknowHowtosetaStartpageforyour_DD64/StartOptions_thumb.jpg" width="500" /></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-databind-a-listview-control.html" title="web developer tips (5):绑定ListView控件 (2009-06-12)">web developer tips (5):绑定ListView控件</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/launch-formatting-options-dialog-for-editor-with-2-clicks.html" title="web developer tips (23):两次单击启动编辑器的格式对话框 (2009-07-17)">web developer tips (23):两次单击启动编辑器的格式对话框</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-5.html" title="Visual Studio 2008 每日提示(五) (2008-12-08)">Visual Studio 2008 每日提示(五)</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/import-export-html-per-tag-options-in-vs.html" title="web developer tips (58):在vs里导入导出每一个HTML的标记 (2009-11-03)">web developer tips (58):在vs里导入导出每一个HTML的标记</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-11.html" title="Visual Studio 2008 每日提示(十一) (2008-12-18)">Visual Studio 2008 每日提示(十一)</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html" title="web developer tips (63): 在web应用项目指定vs开发服务器端口 (2009-11-15)">web developer tips (63): 在web应用项目指定vs开发服务器端口</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/change-start-up-options-and-instances-of-asp-net-development-server-in-a-multi-project-solution.html" title="web developer tips (55):多项目解决方案中设置启动项 (2009-10-28)">web developer tips (55):多项目解决方案中设置启动项</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>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.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/set-a-start-page-for-your-web-site-in-visual-web-developer.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (83):通过反射从堆栈里获取调用的方法名称</title>
		<link>http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html</link>
		<comments>http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:19:22 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[反射]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=514</guid>
		<description><![CDATA[原文地址：You can get the name of the calling method from the stack using reflection 几乎每个程序都需要一个日志来记录事件、错误和异常。有时候，在记录的事件里的方法名是很有用的，最简单的做法就是写一个“方法”，这个“方法”使用两个参数：调用的方法名和事件 http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html [C#] 1: void Log(string callingMethodName, string eventMessage) 2: { 3: Console.WriteLine("Event logged by " + callingMethodName); 4: Console.WriteLine("Event: " + eventMessage); 5: 6: } 在这个例子中，每个方法在调用的时候都需要指出它的名称。除此外，如果方法名改变了，开发者需要知道。然而，这里有个简洁的方法得到调用方法的名称，就是通过堆栈获取。因为栈顶的方法是当前被正在执行的方法，所以调用方法将是正确的。据此，可以通过跟踪实例堆栈（注意不要忘记包含System.Diagnostics）和得到frame第一索引值，得到一个来自调用方法中与StackFrame相对应的调用，最后使用反射(reflection )得到方法名。 01: using System.Diagnostics; 02: 03: void Log(string eventMessage) 04: { 05: 06: Console.WriteLine("Event [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/23/tip-83-did-you-know-you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.aspx" target="_blank">You can get the name of the calling method from the stack using reflection</a></p>
<p>几乎每个程序都需要一个日志来记录事件、错误和异常。有时候，在记录的事件里的方法名是很有用的，最简单的做法就是写一个“方法”，这个“方法”使用两个参数：调用的方法名和事件<br />
<a href="http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html" target="_blank"> http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html</a><br />
[C#]</p>
<div class=code>
<pre class="code"><span style="color: black; font-weight: bold">1:  </span><span style="color: blue">void </span>Log(<span style="color: blue">string </span>callingMethodName, <span style="color: blue">string </span>eventMessage)
<span style="color: black; font-weight: bold">2:  </span>{
<span style="color: black; font-weight: bold">3:  </span><span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">"Event logged by " </span>+ callingMethodName);
<span style="color: black; font-weight: bold">4:  </span><span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">"Event: " </span>+ eventMessage);
<span style="color: black; font-weight: bold">5:  </span>
<span style="color: black; font-weight: bold">6:  </span>}</pre>
</div>
<p>在这个例子中，每个方法在调用的时候都需要指出它的名称。除此外，如果方法名改变了，开发者需要知道。然而，这里有个简洁的方法得到调用方法的名称，就是通过堆栈获取。因为栈顶的方法是当前被正在执行的方法，所以调用方法将是正确的。据此，可以通过跟踪实例堆栈（注意不要忘记包含System.Diagnostics）和得到frame第一索引值，得到一个来自调用方法中与StackFrame相对应的调用，最后使用反射(reflection )得到方法名。</p>
<div class=code>
<pre class="code"><span style="color: black; font-weight: bold">01:  </span><span style="color: blue">using </span>System.Diagnostics;
<span style="color: black; font-weight: bold">02:  </span>
<span style="color: black; font-weight: bold">03:  </span><span style="color: blue">void </span>Log(<span style="color: blue">string </span>eventMessage)
<span style="color: black; font-weight: bold">04:  </span>{
<span style="color: black; font-weight: bold">05:  </span>
<span style="color: black; font-weight: bold">06:  </span>   <span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">"Event logged by " </span>+ (<span style="color: blue">new </span>StackTrace()).GetFrame(1).GetMethod().Name);
<span style="color: black; font-weight: bold">07:  </span>
<span style="color: black; font-weight: bold">08:  </span>   <span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">"Event: " </span>+ eventMessage);
<span style="color: black; font-weight: bold">09:  </span>
<span style="color: black; font-weight: bold">10:  </span>}</pre>
</div>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/maintain-scrollposition-after-post-back.html" title="web developer tips (75):PostBack后保持滚动条的位置 (2010-03-17)">web developer tips (75):PostBack后保持滚动条的位置</a> (1)</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/how-to-organize-usings.html" title="web developer tips (37):如何组织Using指令 (2009-08-24)">web developer tips (37):如何组织Using指令</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html" title="web developer tips (84):在Visual Web Developer中设置web网站的起始页 (2010-03-29)">web developer tips (84):在Visual Web Developer中设置web网站的起始页</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/install-iis-7-from-the-command-line.html" title="web developer tips (70):使用命令脚本安装IIS7 (2009-12-04)">web developer tips (70):使用命令脚本安装IIS7</a> (2)</li>
	<li><a href="http://www.watch-life.net/visual-studio/iis7-application-pool-s-ping-settings-may-affect-debugging.html" title="web developer tips (48):IIS7应用程序池的“Ping”设置可能影响调试 (2009-09-16)">web developer tips (48):IIS7应用程序池的“Ping”设置可能影响调试</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html" title="web developer tips (52):部署Asp.net web应用须设置debug为false (2009-09-27)">web developer tips (52):部署Asp.net web应用须设置debug为false</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html" title="web developer tips (77):在ASP.NET启动启动页面级跟踪 (2010-03-23)">web developer tips (77):在ASP.NET启动启动页面级跟踪</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.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/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (82):Visual Studio 2005web应用项目迁移到Visual Studio 2008</title>
		<link>http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html</link>
		<comments>http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 16:06:45 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[web developer tips]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=513</guid>
		<description><![CDATA[原文地址：How to migrate Visual Studio 2005 Web Application Project to Visual Studio 2008 下面的步骤介绍如何把Visual Studio 2005的Web应用程序项目可以迁移到Visual Studio 2008： 1、备份原项目。 2、打开Visual Studio 2008。 3、单击“文件”菜单，选择“打开项目”，打开要迁移的项目。 4、你将看到如下帮你转换到当前版本的转换向导，单击“下一步” http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html 5、如果你想向导帮你备份，请选择“是”，否则请选择“否”，点击“下一步” 6、请务必阅读屏幕里的摘要后点击“完成”。 7、一点击“完成”按钮，你将看见一个确认升级的对话框，如果要升级到最新的.net框架点击“是”，负责选择“否”。如果选择“是”进行升级，项目连同web.config文件一起升级到最新的.net框架。强烈建议选中“解决方案的所有web项都进行相同的处理”项。 8、转换向导显示状态给你，选中“关闭转换向导后显示日志”项，单击“关闭”。 如果你的项目使用了Ajax ，则需要在vs2008里安装ASP.NET Ajax Extensions 1.0，否则将无法升级。如何安装Ajax Extensions详见：web developer tips (62):在vs工具箱添加AJAX控件工具包 你可能也会喜欢以下文章： web developer tips (53):在vs的设计视图编辑gridview的模板 (0) 设置VSS2005使支持通过Internet访问（转） (0) Visual Studio 2008 每日提示(二十八) (1) web developer tips (9):在Web.config文件中注册web用户控件 [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/18/migrating-vs-2005-web-application-project-to-vs-2008.aspx" target="_blank">How to migrate Visual Studio 2005 Web Application Project to Visual Studio 2008</a></p>
<p>下面的步骤介绍如何把Visual Studio 2005的Web应用程序项目可以迁移到Visual Studio 2008：<br />
1、备份原项目。<br />
2、打开Visual Studio 2008。<br />
3、单击“文件”菜单，选择“打开项目”，打开要迁移的项目。<br />
4、你将看到如下帮你转换到当前版本的转换向导，单击“下一步”<br />
<a href="http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html" target="_blank"> http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html</a><br />
<img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/MigratingVS2005WebApplicationProjecttoVS_E8A4/image_thumb_5.png" width="511" height="403"><br />
5、如果你想向导帮你备份，请选择“是”，否则请选择“否”，点击“下一步”<br />
<img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/MigratingVS2005WebApplicationProjecttoVS_E8A4/image_thumb_1.png" width="512" height="403"><br />
6、请务必阅读屏幕里的摘要后点击“完成”。<br />
<img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/MigratingVS2005WebApplicationProjecttoVS_E8A4/image_thumb_2.png" width="511" height="401"><br />
7、一点击“完成”按钮，你将看见一个确认升级的对话框，如果要升级到最新的.net框架点击“是”，负责选择“否”。如果选择“是”进行升级，项目连同web.config文件一起升级到最新的.net框架。强烈建议选中“解决方案的所有web项都进行相同的处理”项。<br />
<img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/MigratingVS2005WebApplicationProjecttoVS_E8A4/image_thumb_3.png" width="511" height="243"><br />
8、转换向导显示状态给你，选中“关闭转换向导后显示日志”项，单击“关闭”。<br />
<img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/MigratingVS2005WebApplicationProjecttoVS_E8A4/image_thumb_4.png" width="511" height="401"><br />
如果你的项目使用了Ajax ，则需要在vs2008里安装<a href="http://www.watch-life.net/category/aspnet" target="_blank">ASP.NET</a> Ajax Extensions 1.0，否则将无法升级。如何安装Ajax Extensions详见：web developer tips (62):<a href="http://www.watch-life.net/visual-studio/add-ajax-control-toolkit-to-the-toolbox.html" target="_blank">在vs工具箱添加AJAX控件工具包</a></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/edit-the-templates-for-gridview-in-vs-designer.html" title="web developer tips (53):在vs的设计视图编辑gridview的模板 (2009-10-12)">web developer tips (53):在vs的设计视图编辑gridview的模板</a> (0)</li>
	<li><a href="http://www.watch-life.net/vs2005/vss2005-internet-suport.html" title="设置VSS2005使支持通过Internet访问（转） (2007-07-09)">设置VSS2005使支持通过Internet访问（转）</a> (0)</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>
	<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/visual-studio-2008-tip-day-25.html" title="Visual Studio 2008 每日提示(二十五) (2009-01-08)">Visual Studio 2008 每日提示(二十五)</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/top-13-visual-studio-keyboard.html" title="Visual Studio 最常用的13个快捷键 (2009-04-24)">Visual Studio 最常用的13个快捷键</a> (7)</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/visual-studio-2008-tip-day-21.html" title="Visual Studio 2008 每日提示(二十一) (2009-01-03)">Visual Studio 2008 每日提示(二十一)</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：1 | <b><a href='http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.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/migrating-vs-2005-web-application-project-to-vs-2008.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/migrating-vs-2005-web-application-project-to-vs-2008.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>web developer tips (81):为css的智能提示和属性选择css的模式</title>
		<link>http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html</link>
		<comments>http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 14:47:07 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[模式]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=512</guid>
		<description><![CDATA[原文地址：How to Select the CSS Schema for Intellisense and CSS Properties 在Visual Studio 2008里，有个样式工具栏（Style Sheet Toolbar ），通过它允许选择使用的css模式（CSS Schema），如下图所示 但是这个设置只支持css的编辑器，不支持在aspx和html页面的智能提示。也不支持css属性窗体里属性/值的设置。如下图所示： http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html 实际上，为aspx和html页面设置css的模式，有点难以理解。在vs2008当前正在使用的css模式是推断出而不是选择的，这个设置是不可见的。选择css模式用于配合html模式（HTML Schema），可以通过html的源代码编辑器的工具栏来选择，如下图所示： 在html源代码编辑器的工具栏里，通过选择“验证的目标架构”项，隐含了选择一个相应的css模式；在web设计器里，这个选项可以用于html、aspx和其他相似的打开文档。 下面这张表是在Visual Studio 2008里html模式与css模式对应的表 HTML Schema CSS Schema Internet Explorer 6.0 Internet Explorer 6.0 Internet Explorer 3.02/Netscape Navigator 3.0 CSS 1.0 Netscape Navigator 4.0 CSS 2.1* HTML 4.01 CSS 1.0 XHTML 1.0 Transitional [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/18/tip-81-did-you-know-how-to-select-the-css-schema-for-intellisense-and-css-properties.aspx" target="_blank">How to Select the CSS Schema for Intellisense and CSS Properties</a></p>
<p>在Visual Studio 2008里，有个样式工具栏（Style Sheet Toolbar ），通过它允许选择使用的css模式（CSS Schema），如下图所示<br />
<img alt="css1" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip.HowtoSelecttheCSSSchemaforIntellisen_9DB4/css1_thumb.jpg" width="380" height="109" /><br />
但是这个设置只支持css的编辑器，不支持在aspx和html页面的智能提示。也不支持css属性窗体里属性/值的设置。如下图所示：<br />
<img alt="css2" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip.HowtoSelecttheCSSSchemaforIntellisen_9DB4/css2_thumb.jpg" width="501" height="267" /></p>
<p><a href="http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html" target="_blank">http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html</a></p>
<p>实际上，为aspx和html页面设置css的模式，有点难以理解。在vs2008当前正在使用的css模式是推断出而不是选择的，这个设置是不可见的。选择css模式用于配合html模式（HTML Schema），可以通过html的源代码编辑器的工具栏来选择，如下图所示：<br />
<img alt="css3" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip.HowtoSelecttheCSSSchemaforIntellisen_9DB4/css3_thumb.jpg" width="506" height="139" /></p>
<p>在html源代码编辑器的工具栏里，通过选择“验证的目标架构”项，隐含了选择一个相应的<a href="http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html" target="_blank">css模式</a>；在web设计器里，这个选项可以用于html、aspx和其他相似的打开文档。</p>
<p>下面这张表是在Visual Studio 2008里html模式与css模式对应的表</p>
<table border="1" cellspacing="0" cellpadding="2" width="511">
<tbody>
<tr>
<td valign="top" width="325"><b>HTML Schema</b></td>
<td valign="top" width="184"><b>CSS Schema</b></td>
</tr>
<tr>
<td valign="top" width="324">Internet Explorer 6.0</td>
<td valign="top" width="184">Internet Explorer 6.0</td>
</tr>
<tr>
<td valign="top" width="323">Internet Explorer 3.02/Netscape Navigator 3.0</td>
<td valign="top" width="184">CSS 1.0</td>
</tr>
<tr>
<td valign="top" width="323">Netscape Navigator 4.0</td>
<td valign="top" width="184">CSS 2.1*</td>
</tr>
<tr>
<td valign="top" width="323">HTML 4.01</td>
<td valign="top" width="184">CSS 1.0</td>
</tr>
<tr>
<td valign="top" width="323">XHTML 1.0 Transitional</td>
<td valign="top" width="184">CSS 2.0</td>
</tr>
<tr>
<td valign="top" width="323">XHTML 1.0 Frameset</td>
<td valign="top" width="184">CSS 2.0</td>
</tr>
<tr>
<td valign="top" width="323">XHTML 1.1</td>
<td valign="top" width="184">CSS 2.1</td>
</tr>
</tbody>
</table>
<p><br/> </p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-30.html" title="Visual Studio 2008 每日提示(三十) (2009-02-25)">Visual Studio 2008 每日提示(三十)</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/top-13-visual-studio-keyboard.html" title="Visual Studio 最常用的13个快捷键 (2009-04-24)">Visual Studio 最常用的13个快捷键</a> (7)</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/launch-formatting-options-dialog-for-editor-with-2-clicks.html" title="web developer tips (23):两次单击启动编辑器的格式对话框 (2009-07-17)">web developer tips (23):两次单击启动编辑器的格式对话框</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/about-the-tag-navigator-feature.html" title="web developer tips (6):关于标记导航功能 (2009-06-14)">web developer tips (6):关于标记导航功能</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-21.html" title="Visual Studio 2008 每日提示(二十一) (2009-01-03)">Visual Studio 2008 每日提示(二十一)</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/install-iis-7-from-the-command-line.html" title="web developer tips (70):使用命令脚本安装IIS7 (2009-12-04)">web developer tips (70):使用命令脚本安装IIS7</a> (2)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.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/how-to-select-the-css-schema-for-intellisense-and-css-properties.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (80):将javascript的错误显示为警告</title>
		<link>http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html</link>
		<comments>http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 06:15:45 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[web developer tips]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=511</guid>
		<description><![CDATA[原文地址：How to show JScript validation errors as warnings? 在Visual Studio 2008 RTM版本里，javascript的验证设置在html验证设置的选项里，从Visual Studio 2008 SP1 或更新的版本开始，增加了新的javascript选项对话框，有关这个设置详见：Introducing JScript Formatting in VS 2008 SP1（介绍在vs 2008 sp1中javascript的格式）。随着这个变化，javascript验证选择位于“杂项”标签下，如下图所示: http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html 可以通过菜单：工具+选项+文本编辑器+Jscript+杂项，选中“显示语法错误”和“将错误显示为警告”项。有人喜欢在错误里表显示javascript错误，因为这将鼓励使用标准；有人不喜欢这样处理错误，因为它们是浏览器导致的错误。 你可能也会喜欢以下文章： web developer tips (13):用ASP.NET Ajax获取浏览器的agent (0) Visual Studio 2008 每日提示(十五) (0) Visual Studio 最常用的13个快捷键 (7) web developer tips (16):变更CSS编辑器的默认格式设置 (0) Visual Studio 2008 每日提示(十二) (0) web developer tips [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/15/tip-80-did-you-know-how-to-show-jscript-validation-errors-as-warnings.aspx" target="_blank">How to show JScript validation errors as warnings?</a></p>
<p>在Visual Studio 2008 RTM版本里，javascript的验证设置在html验证设置的选项里，从Visual Studio 2008 SP1 或更新的版本开始，增加了新的javascript选项对话框，有关这个设置详见：<a href="http://blogs.msdn.com/webdevtools/archive/2008/05/12/introducing-jscript-formatting-in-vs-2008-sp1.aspx" target="_blank">Introducing JScript Formatting in VS 2008 SP1</a>（介绍在vs 2008 sp1中javascript的格式）。随着这个变化，javascript验证选择位于“杂项”标签下，如下图所示:<br />
<IMG alt=JScript src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip80DidyouknowHowtoshowJScriptvalidatio_A778/JScript_thumb.png" width=525 height=305 mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip80DidyouknowHowtoshowJScriptvalidatio_A778/JScript_thumb.png"><br />
<a href="http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html" target="_blank">http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html</a></p>
<p>可以通过菜单：<strong>工具+选项+文本编辑器+Jscript+杂项</strong>，选中“显示语法错误”和“将错误显示为警告”项。有人喜欢在错误里表显示javascript错误，因为这将鼓励使用标准；有人不喜欢这样处理错误，因为它们是浏览器导致的错误。</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/get-the-browser-agent-using-asp-net-ajax.html" title="web developer tips (13):用ASP.NET Ajax获取浏览器的agent (2009-06-28)">web developer tips (13):用ASP.NET Ajax获取浏览器的agent</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-15.html" title="Visual Studio 2008 每日提示(十五) (2008-12-24)">Visual Studio 2008 每日提示(十五)</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/top-13-visual-studio-keyboard.html" title="Visual Studio 最常用的13个快捷键 (2009-04-24)">Visual Studio 最常用的13个快捷键</a> (7)</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/visual-studio-2008-tip-day-12.html" title="Visual Studio 2008 每日提示(十二) (2008-12-20)">Visual Studio 2008 每日提示(十二)</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/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/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>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.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/show-jscript-validation-errors-as-warnings.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/show-jscript-validation-errors-as-warnings.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (79):在web页面快速添加和取消注释</title>
		<link>http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html</link>
		<comments>http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 05:17:32 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[aspx]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[web.cofig]]></category>
		<category><![CDATA[注释]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=510</guid>
		<description><![CDATA[原文地址：How to quickly comment and uncomment in your web pages 在aspx、html、web.config等文件里注释选择行，可以单击工具栏的Comment（注释）/ Uncomment（取消注释）图标来实现。 http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html 注释图标如下图所示： 取消注释图标如下图所示： 或者你也可以通过快捷键Ctrl+K Ctrl+C添加注释，通过快捷键Ctrl+K Ctrl+U取消注释。 在Asp.net的aspx里的注释 在html页面的注释 在script 块的注释 这些注释或取消注释快捷键也出现在菜单：编辑+高级+注释选择内容/取消注释选择内容里 你可能也会喜欢以下文章： web developer tips (39):在Visual Studio 2008中取消远程web操作 (0) web developer tips (51):使用vs2005和IE8进行调试 (0) web developer tips (23):两次单击启动编辑器的格式对话框 (0) 英文阅读：如何成为更好的程序员 (1) web developer tips (24):显示html/css的警告错误或错误 (0) web developer tips (1):创建、管理、应用样式表的强大工具 (2) web developer [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/15/tip-79-did-you-know-how-to-quickly-comment-and-uncomment-in-your-web-pages.aspx" target="_blank">How to quickly comment and uncomment in your web pages</a></p>
<p>在aspx、html、web.config等文件里注释选择行，可以单击工具栏的<strong>Comment（注释）/ Uncomment（取消注释）</strong>图标来实现。<br />
<a href="http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html" target="_blank">http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html</a><br />
注释图标如下图所示：<br />
<img title="Comment Icon" height="33" alt="Comment Icon" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Comment%20Icon_thumb_1.jpg" width="273" /><br />
取消注释图标如下图所示：<br />
<img title="Uncomment" height="28" alt="Uncomment" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Uncomment_thumb.jpg" width="274" /></p>
<p>或者你也可以通过快捷键<strong>Ctrl+K Ctrl+C</strong>添加注释，通过快捷键<strong>Ctrl+K Ctrl+U</strong>取消注释。</p>
<p>在<a href="http://www.watch-life.net/category/aspnet" target="_blank">Asp.net</a>的aspx里的注释<br />
<img title="Comments in ASPX page" height="67" alt="Comments in ASPX page" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Comments%20in%20ASPX%20page_thumb.jpg" width="510" /><br />
在html页面的注释<br />
<img title="Comments in HTML page" height="96" alt="Comments in HTML page" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Comments%20in%20HTML%20page_thumb_1.jpg" width="507" /><br />
在script 块的注释<br />
<img title="Script block" height="93" alt="Script block" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Script%20block_thumb.jpg" width="507" /></p>
<p>这些<a href="http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html" target="_blank">注释或取消注释快捷键</a>也出现在菜单：<strong>编辑+高级+注释选择内容/取消注释选择内容</strong>里</p>
<p><img title="Comment Uncomment Menu Option" height="258" alt="Comment Uncomment Menu Option" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Did.HowtocommentcodeinVisualwebDeveloper_FFDA/Comment%20Uncomment%20Menu%20Option_thumb.jpg" width="502" /></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/cancel-a-remote-web-operation-in-visual-studio-2008.html" title="web developer tips (39):在Visual Studio 2008中取消远程web操作 (2009-08-28)">web developer tips (39):在Visual Studio 2008中取消远程web操作</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html" title="web developer tips (51):使用vs2005和IE8进行调试 (2009-09-25)">web developer tips (51):使用vs2005和IE8进行调试</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/launch-formatting-options-dialog-for-editor-with-2-clicks.html" title="web developer tips (23):两次单击启动编辑器的格式对话框 (2009-07-17)">web developer tips (23):两次单击启动编辑器的格式对话框</a> (0)</li>
	<li><a href="http://www.watch-life.net/programming-notes/read-how-to-be-a-better-developer.html" title="英文阅读：如何成为更好的程序员 (2008-02-17)">英文阅读：如何成为更好的程序员</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/display-css-html-errors-as-warnings-or-as-errors.html" title="web developer tips (24):显示html/css的警告错误或错误 (2009-07-17)">web developer tips (24):显示html/css的警告错误或错误</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/how-to-databind-a-listview-control.html" title="web developer tips (5):绑定ListView控件 (2009-06-12)">web developer tips (5):绑定ListView控件</a> (1)</li>
	<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>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.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/quickly-comment-and-uncomment-in-your-web-pages.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/quickly-comment-and-uncomment-in-your-web-pages.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (78):使用文档大纲导航</title>
		<link>http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html</link>
		<comments>http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html#comments</comments>
		<pubDate>Sun, 28 Mar 2010 04:54:21 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Document Outline]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[文档大纲]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=509</guid>
		<description><![CDATA[原文地址：How to navigate using Document Outline? 通过菜单：视图+文档大纲，或者快捷键键Ctrl-Alt-T可以打开文档大纲。“文档大纲”（Document Outline）窗口提供当前文档中元素和脚本的大纲视图。文档大纲可以打开嵌套的分级元素和页面的脚本，很好显示页面的概览和分层结构。 http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html 使用“文档大纲”可以执行以下操作： 查看文档的逻辑结构。 查看哪些元素属于 HTML 元素，哪些属于 Web 服务器控件。 定位到“设计”视图或“源”视图中的特定元素。 在文档大纲双击任何列出的元素，在设计视图或源视图将会高亮突出显示相应标记的元素，同时显示依赖那个打开的视图，这对在一些大型、复杂的页面进行导航非常有用。 注意：仅当 Windows 窗体应用程序处于 Form 或 UserControl 的“设计”视图中时，“文档大纲”才处于活动状态。当您在“代码”视图中时，它不会显示任何内容。 有关文档视图的更多内容参见：Document Outline Window（英文）或文档大纲”窗口 你可能也会喜欢以下文章： web developer tips (22):提高页面和服务器控件加载速度 (0) web developer tips (17):远程调试使用IIS的web应用 (0) web developer tips (38):如何用请求失败记录追踪重写规则 (0) web developer tips (81):为css的智能提示和属性选择css的模式 (0) web developer tips (43):通过请求处理管道注册IHttpModule (0) web [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/12/tip-77-did-you-know-how-to-navigate-using-document-outline.aspx" target="_blank">How to navigate using Document Outline?</a></p>
<p>通过菜单：<strong>视图+文档大纲</strong>，或者快捷键键<strong>Ctrl-Alt-T</strong>可以打开<strong>文档大纲</strong>。“文档大纲”（Document Outline）窗口提供当前文档中元素和脚本的大纲视图。文档大纲可以打开嵌套的分级元素和页面的脚本，很好显示页面的概览和分层结构。<br />
<a href="http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html" target="_blank">http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html</a></p>
<p>使用“文档大纲”可以执行以下操作：<br />
查看文档的逻辑结构。<br />
查看哪些元素属于 HTML 元素，哪些属于 Web 服务器控件。<br />
定位到“设计”视图或“源”视图中的特定元素。</p>
<p>在文档大纲双击任何列出的元素，在设计视图或源视图将会高亮突出显示相应标记的元素，同时显示依赖那个打开的视图，这对在一些大型、复杂的页面进行导航非常有用。</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px; border-right-width: 0px" height="480" alt="DocumentOutline" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtonavigateusingDocumen_8E9B/DocumentOutline_thumb_1.jpg" width="519" border="0" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtonavigateusingDocumen_8E9B/DocumentOutline_thumb_1.jpg" /></p>
<p>注意：仅当 Windows 窗体应用程序处于 Form 或 UserControl 的“设计”视图中时，“文档大纲”才处于活动状态。当您在“代码”视图中时，它不会显示任何内容。</p>
<p>有关文档视图的更多内容参见：<a href="http://msdn.microsoft.com/en-us/library/46xf4h0w.aspx" target="_blank">Document Outline Window</a>（英文）或<a href="http://msdn.microsoft.com/zh-cn/library/46xf4h0w.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/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/remote-debugging-waps-using-iis.html" title="web developer tips (17):远程调试使用IIS的web应用 (2009-07-06)">web developer tips (17):远程调试使用IIS的web应用</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/use-failed-request-tracing-to-trace-rewrite-rules.html" title="web developer tips (38):如何用请求失败记录追踪重写规则 (2009-08-27)">web developer tips (38):如何用请求失败记录追踪重写规则</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-to-select-the-css-schema-for-intellisense-and-css-properties.html" title="web developer tips (81):为css的智能提示和属性选择css的模式 (2010-03-28)">web developer tips (81):为css的智能提示和属性选择css的模式</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>
	<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>
	<li><a href="http://www.watch-life.net/visual-studio/set-the-default-view-to-design-view.html" title="web developer tips (19):设置默认视图为设计视图 (2009-07-08)">web developer tips (19):设置默认视图为设计视图</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/change-start-up-options-and-instances-of-asp-net-development-server-in-a-multi-project-solution.html" title="web developer tips (55):多项目解决方案中设置启动项 (2009-10-28)">web developer tips (55):多项目解决方案中设置启动项</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.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/know-how-to-navigate-using-document-outline.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/know-how-to-navigate-using-document-outline.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (77):在ASP.NET启动启动页面级跟踪</title>
		<link>http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html</link>
		<comments>http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html#comments</comments>
		<pubDate>Tue, 23 Mar 2010 14:47:47 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[tracing]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[跟踪]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=506</guid>
		<description><![CDATA[原文地址： How to enable Page Level Tracing for your ASP.NET pages 在调试Asp.net的web应用的时候，启动页面级跟踪，将会给一大串的有用信息。这些跟踪信息可以帮助我们理解控件在各种视图状态下的运行情况，比如PreInit（事件）的开始和结束时，Init事件的开始和结束状态，Render事件的开始和结束状态 等等。这些信息会出现在页面的底部。默认情况下页面级跟踪是不开启的。 http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html 跟踪可以页面级和应用级启动。 开启的方法： Visual Studio 2008在属性窗口选择“ DOCUMENT ”，设置“ Trace ”属性为“true”，如下所示： 这种设置将在指定的页面上添加Trace=&#34;true&#34;，如下所示： &#60;%@ Page Language=&#34;VB&#34;&#160; Trace=&#34;true&#34; %&#62; 同时，如果想显示的跟踪按时间排序（SortedByTime）或 按类别排序（SortByCategory），也可以设置TraceMode 属性。 运行页面后，效果详情如下所示： 可以通过Asp.net应用根目录的web.config文件来启动应用级跟踪，这样启动后你可以获取整个应用所有页面的跟踪信息。在这种情况下，如果你不想跟踪某个特定的页面，应该设置页面级跟踪为不启用。 应用级跟踪的设置方法，在web.cofig中设置如下： &#60;configuration&#62; &#60;system.web&#62; &#60;trace enabled=&#34;true&#34; requestLimit=&#34;40&#34; localOnly=&#34;false&#34;/&#62; &#60;/system.web&#62;&#60;/configuration&#62; 记住在应用发布的时候，要关闭跟踪。同时，页面级跟踪会覆盖应用级跟踪。 你可能也会喜欢以下文章： 让GridView中CheckBox列支持FireFox (0) web developer tips (31):利用IIS 7.0的URL Rewrite 模块产生用户友好的URL (0) web [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址： <a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/11/tip-77-did-you-know-how-to-enable-page-level-tracing-for-your-asp-net-pages.aspx" target="_blank">How to enable Page Level Tracing for your ASP.NET pages</a></p>
<p>在调试<a href="http://www.watch-life.net/category/aspnet" target="_blank">Asp.net</a>的web应用的时候，启动页面级跟踪，将会给一大串的有用信息。这些跟踪信息可以帮助我们理解控件在各种视图状态下的运行情况，比如PreInit（事件）的开始和结束时，Init事件的开始和结束状态，Render事件的开始和结束状态 等等。这些信息会出现在页面的底部。默认情况下页面级跟踪是不开启的。</p>
<p><a href="http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html" target="_blank">http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html</a></p>
<p>跟踪可以页面级和应用级启动。</p>
<p>开启的方法： Visual Studio 2008在属性窗口选择“ <strong>DOCUMENT</strong> ”，设置“ <strong>Trace</strong>  ”属性为“<font color="red">true</font>”，如下所示：</p>
<p><img title="Enable trace for a page." height="436" alt="Enable trace for a page." src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtoenablePageLe.NETpage_C29D/Enable%20trace%20for%20a%20page._thumb.jpg" width="229" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtoenablePageLe.NETpage_C29D/Enable%20trace%20for%20a%20page._thumb.jpg" /></p>
<p>这种设置将在指定的页面上添加<strong>Trace=&quot;true&quot;</strong>，如下所示：</p>
<div class=code>&lt;%@ Page Language=&quot;VB&quot;&#160; Trace=&quot;true&quot; %&gt;</div>
<p>同时，如果想显示的跟踪按时间排序（SortedByTime）或 按类别排序（SortByCategory），也可以设置<strong>TraceMode </strong>属性。</p>
<p>运行页面后，效果详情如下所示：<br />
<img title="Tracing Enabled" height="328" alt="Tracing Enabled" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtoenablePageLe.NETpage_C29D/Tracing%20Enabled_thumb.jpg" width="507" mce_src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip77DidyouknowHowtoenablePageLe.NETpage_C29D/Tracing%20Enabled_thumb.jpg" /></p>
<p>可以通过Asp.net应用根目录的web.config文件来启动应用级跟踪，这样启动后你可以获取整个应用所有页面的跟踪信息。在这种情况下，如果你不想跟踪某个特定的页面，应该设置<a href="http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html" target="_blank">页面级跟踪</a>为不启用。</p>
<p>应用级跟踪的设置方法，在web.cofig中设置如下：</p>
<div class=code>
<p>&lt;configuration&gt; &lt;system.web&gt; </p>
<p>&lt;<strong>trace enabled=&quot;true&quot;</strong> requestLimit=&quot;40&quot; localOnly=&quot;false&quot;/&gt; </p>
<p>&lt;/system.web&gt;&lt;/configuration&gt;</p>
</div>
<p>记住在应用发布的时候，要关闭跟踪。同时，页面级跟踪会覆盖应用级跟踪。</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/aspnet/gridview-checkbox-firefox.html" title="让GridView中CheckBox列支持FireFox (2008-07-08)">让GridView中CheckBox列支持FireFox</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/have-user-friendly-url-using-iis-7-0-url-rewrite-module.html" title="web developer tips (31):利用IIS 7.0的URL Rewrite 模块产生用户友好的URL (2009-07-29)">web developer tips (31):利用IIS 7.0的URL Rewrite 模块产生用户友好的URL</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/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/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/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/change-start-up-options-and-instances-of-asp-net-development-server-in-a-multi-project-solution.html" title="web developer tips (55):多项目解决方案中设置启动项 (2009-10-28)">web developer tips (55):多项目解决方案中设置启动项</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/specify-a-fixed-port-for-visual-studio-development-server.html" title="web developer tips (63): 在web应用项目指定vs开发服务器端口 (2009-11-15)">web developer tips (63): 在web应用项目指定vs开发服务器端口</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.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/enable-page-level-tracing-for-your-asp-net-pages.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/enable-page-level-tracing-for-your-asp-net-pages.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (76):在设计视图隐藏非可视控件</title>
		<link>http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html</link>
		<comments>http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:44:10 +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=505</guid>
		<description><![CDATA[原文地址：How to hide a non-visual control in your designer? 有时候，在构建web页面的时候，你想隐藏非可视控件，比如Timer 控件，是页面看起来很接近在浏览器呈现的样子。 使用快捷键Ctrl+Shift+N，可以在设计器中切换显示和不显示可视化控件。 http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html 打开显示可视化控件 关闭显示可视化控件 这个选项存在于菜单里 菜单：视图+可视辅助+Asp.net非可视控件 不选中该项，将不显示非可视控件。 你可能也会喜欢以下文章： web developer tips (61):如何创建Asp.net Dynamic Data网站 (0) web developer tips (58):在vs里导入导出每一个HTML的标记 (0) web developer tips (52):部署Asp.net web应用须设置debug为false (0) web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (0) web developer tips (37):如何组织Using指令 (0) web developer tips (69):vs中在浏览器中查看的快捷键 (2) web [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/09/tip-76-did-you-know-how-to-hide-a-non-visual-control-in-your-designer.aspx" target="_blank">How to hide a non-visual control in your designer?</a></p>
<p>有时候，在构建web页面的时候，你想隐藏非可视控件，比如Timer 控件，是页面看起来很接近在浏览器呈现的样子。<br />
使用快捷键<strong>Ctrl+Shift+N</strong>，可以在设计器中切换显示和不显示可视化控件。<br />
<a href="http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html" target="_blank">http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html</a></p>
<p>打开显示可视化控件<br />
<img title="With Visual Aids turned on" height="159" alt="With Visual Aids turned on" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip76DidyouknowHowtohideanonvisualcontro_E85F/With%20Visual%20Aids%20turned%20on_thumb.jpg" width="240" /></p>
<p>关闭显示可视化控件<br />
<img title="NoControls" height="160" alt="NoControls" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip76DidyouknowHowtohideanonvisualcontro_E85F/NoControls_thumb.jpg" width="240" /></p>
<p>这个选项存在于菜单里<br />
菜单：<strong>视图+可视辅助+Asp.net非可视控件</strong></p>
<p><img title="Menu" height="265" alt="Menu" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip76DidyouknowHowtohideanonvisualcontro_E85F/Menu_thumb.jpg" width="519" /><br />
不选中该项，将不显示非可视控件。</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<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>
	<li><a href="http://www.watch-life.net/visual-studio/import-export-html-per-tag-options-in-vs.html" title="web developer tips (58):在vs里导入导出每一个HTML的标记 (2009-11-03)">web developer tips (58):在vs里导入导出每一个HTML的标记</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html" title="web developer tips (52):部署Asp.net web应用须设置debug为false (2009-09-27)">web developer tips (52):部署Asp.net web应用须设置debug为false</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/how-to-organize-usings.html" title="web developer tips (37):如何组织Using指令 (2009-08-24)">web developer tips (37):如何组织Using指令</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/the-keyboard-shortcut-for-view-in-browser.html" title="web developer tips (69):vs中在浏览器中查看的快捷键 (2009-11-27)">web developer tips (69):vs中在浏览器中查看的快捷键</a> (2)</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/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>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.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/hide-a-non-visual-control-in-your-designer.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/hide-a-non-visual-control-in-your-designer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (75):PostBack后保持滚动条的位置</title>
		<link>http://www.watch-life.net/visual-studio/maintain-scrollposition-after-post-back.html</link>
		<comments>http://www.watch-life.net/visual-studio/maintain-scrollposition-after-post-back.html#comments</comments>
		<pubDate>Wed, 17 Mar 2010 05:09:30 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[MaintainScrollPositionOnPostback]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[滚动条]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=504</guid>
		<description><![CDATA[原文地址：How to maintain scrollposition after post back? 默认情况下，web页面提交返回（post back）后会返回页面的底部。对于一内容很多的页面，你可能需要在页面在提交返回后，滚动条自动滚到用户最后定位的位置。 在Asp.net里，可以通过使用页面的MaintainScrollPositionOnPostBack 属性可以实现上述需求。可以用下面的方法之一: http://www.watch-life.net/life-thinking/maintain-scrollposition-after-post-back.html 1、应用级（Application level:）：设置这个属性默认对整个网站都起作用，打开web.config添加一个pages节点： &#60;pages maintainScrollPositionOnPostBack=&#8221;true&#8221;&#62; 2、页面级（Page Level）：针对某个特定页面，打开aspx，设置属性： &#60;%@ Page MaintainScrollPositionOnPostback=&#8221;true&#8221; &#8230; 3、代码级（Code level）：编程来设置属性 Page.MaintainScrollPositionOnPostBack = true; 你可能也会喜欢以下文章： 在gridview和datagrid里设置列宽 (2) web developer tips (41):用自颁发的证书连接到远程IIS服务器 (0) web developer tips (69):vs中在浏览器中查看的快捷键 (2) web developer tips (9):在Web.config文件中注册web用户控件 (1) web developer tips (45):如何改变动态数据文件夹的位置 (0) web developer tips (61):如何创建Asp.net Dynamic [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/06/08/tip-75-did-you-know-how-to-maintain-scrollposition-after-post-back.aspx" target="_blank">How to maintain scrollposition after post back?</a></p>
<p>默认情况下，web页面提交返回（post  back）后会返回页面的底部。对于一内容很多的页面，你可能需要在页面在提交返回后，滚动条自动滚到用户最后定位的位置。</p>
<p>在Asp.net里，可以通过使用页面的<strong>MaintainScrollPositionOnPostBack</strong> 属性可以实现上述需求。可以用下面的方法之一:</p>
<p><a href="http://www.watch-life.net/life-thinking/maintain-scrollposition-after-post-back.html" target="_blank"> http://www.watch-life.net/life-thinking/maintain-scrollposition-after-post-back.html</a></p>
<p>1、应用级（Application level:）：设置这个属性默认对整个网站都起作用，打开web.config添加一个pages节点：</p>
<div class=code>&lt;pages maintainScrollPositionOnPostBack=&#8221;true&#8221;&gt;</div>
<p>2、页面级（Page Level）：针对某个特定页面，打开aspx，设置属性：</p>
<div class=code>&lt;%@ Page MaintainScrollPositionOnPostback=&#8221;true&#8221; &#8230;</div>
<p>3、代码级（Code level）：编程来设置属性</p>
<div class=code>Page.MaintainScrollPositionOnPostBack = true;</div>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/aspnet/gridview-datagrid-column-width.html" title="在gridview和datagrid里设置列宽 (2008-01-16)">在gridview和datagrid里设置列宽</a> (2)</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/the-keyboard-shortcut-for-view-in-browser.html" title="web developer tips (69):vs中在浏览器中查看的快捷键 (2009-11-27)">web developer tips (69):vs中在浏览器中查看的快捷键</a> (2)</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/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/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>
	<li><a href="http://www.watch-life.net/visual-studio/there-are-several-new-configuration-settings-available-in-fastcgi-extension-1-5-beta.html" title="web developer tips (71): 关于FastCGI 1.5beta几个新配置设置 (2010-01-07)">web developer tips (71): 关于FastCGI 1.5beta几个新配置设置</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/new-year-new-plan.html" title="新年新计划 (2008-02-09)">新年新计划</a> (3)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：1 | <b><a href='http://www.watch-life.net/visual-studio/maintain-scrollposition-after-post-back.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/maintain-scrollposition-after-post-back.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/maintain-scrollposition-after-post-back.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.watch-life.net @ 2010-09-02 21:30:48 -->