标签归档:web developer tips

web developer tips (22):提高页面和服务器控件加载速度

原文地址:How to improve performance of Page and Server Cont […]


原文地址:How to improve performance of Page and Server Control Processing 1、避免不必要的客户端和服务器间的往返,你可以使用ASP.NET Ajax和局部页面呈现(Partial Page Rendering)。 ASP.NET Ajax:ASP.NET Ajax 允许开发者在创建一个asp.netweb应用的时候,更新数据不要重新加载整个页面。 局部页面呈现(Partial Page Rendering):局部页面呈现(Partial-page rendering)依赖 ASP.NET 的服务控件...... [阅读全文]

web developer tips (21):为Developer Web Server设定固定端口

原文地址:How to set a fixed port for the Developer Web Serv […]


原文地址:How to set a fixed port for the Developer Web Server 当创建一个网站项目的时候,Visual Studio 的开发web服务器(Developer Web Server)会激活本地端口用来运行web网站,默认的情况下,这个端口值是一个可用的随机动态端口,在某些情况下,你也许想web服务器使用固定的端口,可以进行如下配置: http://www.watch-life.net/visual-studio/set-a-fixed-port-for-the-developer-web-server.html 1、如果没有打开Visual Studio的属性窗口,可以使用F4或菜单:视图+属性窗口,打开属性窗口。 2、在解决方案管理器中,左键选中web网站项目 3、...... [阅读全文]

web developer tips (19):设置默认视图为设计视图

原文地址:How to set the default view to Design view 在 Visua […]


原文地址:How to set the default view to Design view 在 Visual Studio 2008的编辑一个web页面的时候,“源视图”(Source View),你可以自定义设计视图(Design View)为默认视图。 http://www.watch-life.net/visual-studio/set-the-default-view-to-design-view.html 菜单:工具+选项+html设计器+常规,在“起始位置”选项中,选中“设计视图”,如下图所示: 快捷键Shift+...... [阅读全文]

web developer tips (18):从工具箱粘贴或拖拽控件时进行绝对定位

原文地址:How to absolute position controls on copy paste or […]


原文地址:How to absolute position controls on copy paste or drag drop from Toolbox 在设计器里为了让任何任一控件进行绝对定位,你需要选中控件,然后选择如下菜单:格式+设置位置+绝对。 有时候,你也许想从工具箱拖拽控件或在设计器里剪贴控件后就让控件被绝对定位。你可以这样做: http://www.watch-life.net/life-thinking/absolute-position-controls-on-copy-paste-or-drag-drop-from-toolbox.html 菜单:工具+选项+html设计器+css样式,选中“对于使用工具箱、粘贴或拖放控件时,将定位更改为绝对定位”。 ...... [阅读全文]

web developer tips (17):远程调试使用IIS的web应用

原文地址:How to remote debug WAPs that are using IIS 如果你有个使 […]


原文地址:How to remote debug WAPs that are using IIS 如果你有个使用iisweb应用发布在另一台服务器,你可以使用 Visual Studio 2008 SP1来远程调试这个web应用。 http://www.watch-life.net/visual-studio/remote-debugging-waps-using-iis.html 首先通过菜单:文件+打开项目,打开(远程)服务器(比如 \\server\share)的web应用项目,右键单击“项目”选择“属性”,打开“web”标签页。在“服务器”选项里,选中“使用自定义web服务...... [阅读全文]

web developer tips (16):变更CSS编辑器的默认格式设置

原文地址:change the default format settings for CSS Editor […]


原文地址:change the default format settings for CSS Editor 菜单:工具+选项+文本编辑器+css+格式。 这个对话框给出了三种css书写格式,你可以根据自己的需要灵活选择: http://www.watch-life.net/visual-studio/change-the-default-format-settings-for-css-editor.html 紧凑模式(Compact rules):选择这个选项后,属性会被放在一行,如下所示: &...... [阅读全文]

web developer tips (14):启动网站调试

原文地址:How to enable debugging of your Web Site 在debug的模式 […]


原文地址:How to enable debugging of your Web Site 在debug的模式配置下运行一个页面,你必须选择菜单:调试+开始启动 或按下F5. 在默认的情况下,调试是没有启用的。如果你想启动调试网站项目,就需要进行配置。这个设置通过修改web.config文件来实现。 默认情况下,在web.config 的compilation节点 的debug 选项设置值是false。 http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html <compilation debug="false" strict="false" ex...... [阅读全文]

web developer tips (13):用ASP.NET Ajax获取浏览器的agent

原文地址:How to get the browser agent using ASP.NET Ajax 当编 […]


原文地址:How to get the browser agent using ASP.NET Ajax 当编写一个web应用的时候,很多时候,针对不同的浏览器做不同的页面请求,ASP.NET Ajax 有个简单的办法通过 Sys.Browser来获取浏览器对象。 http://www.watch-life.net/visual-studio/get-the-browser-agent-using-asp-net-ajax.html 例如,想针对Opera浏览器做一些不同的页面请求,下面的代码块显示可以如何: <script language="javascript&q...... [阅读全文]

web developer tips (12):在Visual Web Developer里创建IIS虚拟目录

原文地址:How to create an IIS Virtual Directory from within […]


原文地址:How to create an IIS Virtual Directory from within Visual Web Developer 以下的步骤介绍如何在Visual Web Developer里创建IIS的虚拟目录(Virtual Directory)。当然,IIS已经被安装。 http://www.watch-life.net/visual-studio/create-an-iis-virtual-directory-from-within-visual-web-developer.html 1、创建一个“网站项目”:文件+新建+网站 2、在“新建网站”对话框里,单击“浏览”按钮,打开“选择位置”对话框 ...... [阅读全文]

web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器

原文地址:New Style builder can be invoked from various othe […]


原文地址:New Style builder can be invoked from various other tool windows in Visual Web Developer 在上一篇文章中介绍了“Visual Web Developer 2008中新的样式生成器”。其实有三个入口点可以打开样式生成器的窗体,你可以从IDE的下面三个位置打开它: http://www.watch-life.net/visual-studio/new-style-builder-can-be-invoked-from-various-other-tool-windows-in-visual-web-developer.html CSS属性窗口:通过菜单“视...... [阅读全文]

web developer tips (10):Visual Web Developer 2008中新的样式生成器

原文地址:Visual Web Developer 2008 has a New Style Builder […]


原文地址:Visual Web Developer 2008 has a New Style Builder Dialog Visual Studio 2008里有个新的样式生成器对话框(窗体)。使用此对话框生成样式,也可以在同一时间预览。可以为一个创建样式定位给当前页面或现有的外部样样式表或新的外部样式表。可以创建基于ID的、基于元素的、内嵌的、基于类的的样式。样式有综合选择器。 http://www.watch-life.net/visual-studio/visual-web-developer-2008-has-a-new-style-builder-dialog.html 通过菜单:格式+...... [阅读全文]

web developer tips (8):创建web用户控件并包含在web页面里

原文地址: How to create an ASP.NET Web User Control and inc […]


原文地址: How to create an ASP.NET Web User Control and include it in your web page 使用Visual Web Developer,创建一个web用户控件(Web User Control)和创建一个asp.net的页面一样简单。 步骤如下: http://www.watch-life.net/visual-studio/how-to-create-an-asp-net-web-user-control-and-include-it-in-your-web-page.html 1、打开一个已经创建的用来添加一个用户控件的网站项目。...... [阅读全文]

web developer tips (7):在ListView控件里对数据排序

原文地址:How to Sort data using a ListView control ListView […]


原文地址:How to Sort data using a ListView control ListView 内置数据排序的功能,有关listView绑定数据的功能参见:web developer tips (5):绑定ListView控件.绑定数据后,就可以在Listview进行数据排序,步骤如下: http://www.watch-life.net/visual-studio/how-to-sort-data-using-a-listview-control.html 1、在ListView的LayoutTemplate里增加增...... [阅读全文]

web developer tips (6):关于标记导航功能

原文链接:Did you know…About the “Tag Navigator” feature 在Vi […]


原文链接:Did you know…About the “Tag Navigator” feature 在Visual studio 2008 里面有个很酷的功能:在“设计视图”或“源视图”状态,html编辑器的底部会出现“标记导航”(tag navigator)。 http://www.watch-life.net/visual-studio/about-the-tag-navigator-feature.html 在下面的图片里,你可以看见光标在<DIV>标记里,因此在编辑器底部的标记导航里出现<DIV>的所有父标记元素,一直到根元素。 ...... [阅读全文]

web developer tips (5):绑定ListView控件

原文地址:How to Databind a ListView control ListView 是Visua […]


原文地址:How to Databind a ListView control ListView 是Visual Studio 2008中一个新的控件,使用此控件可以很轻松的进行数据的插入、编辑、删除和排序,也可以在使用这个控件时通过用户定义模板来灵活地显示各种格式的数据。 下面的如何将ListView 绑定到一个SQLDataSource(sql数据源) 步骤: http://www.watch-life.net/visual-studio/how-to-databind-a-listview-control.html 1、从工具箱的数据标签里添加一个Listview控件, Visual Studio将会生成如下图所示的代码 ...... [阅读全文]