标签归档:Asp.net

有关Asp.net的文章

web developer tips (24):显示html/css的警告错误或错误

原文地址:You could display CSS/HTML errors as warnings or a […]


原文地址:You could display CSS/HTML errors as warnings or as errors 在vs2008里面可以有个很cool的功能,可以降级显示作为任何警告的错误,这个功能很有用,它可以让你区分验证的错误和查找让程序无法生成的错误。 http://www.watch-life.net/life-thinking/display-css-html-errors-as-warnings-or-as-errors.html 在vs2008里面,默认会如下图所示显示任何html/css 的作为警告的错误。注意警告有个绿色的波浪线。 ...... [阅读全文]

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 (20):使用IIS作为web服务器

原文地址:How to change WAP to use an IIS Web server 有时候,在开发 […]


原文地址:How to change WAP to use an IIS Web server 有时候,在开发web应用,想使用IIS来代替Visual Studio 开发服务器(Development Server) 作为web应用服务器,可以按如下操作进行: http://www.watch-life.net/visual-studio/change-wap-to-use-an-iis-web-server.html 1、在解决方案管理器中,单击“ Properties”页或在项目的上下文菜单中选择“属性” ...... [阅读全文]

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 (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 (15):在ASP.NET Ajax里使用跟踪

原文地址: How to use tracing with ASP.NET Ajax 如果你在使用ASP.NE […]


原文地址: How to use tracing with ASP.NET Ajax 如果你在使用ASP.NET Ajax的时候,遇到一个页面问题,想在调试时候跟踪语句,有个比较快速的方法:使用“Sys.Debug.trace”函数。 <script language="javascript" type="text/javascript"> function PositionDiv() { Sys.Debug.trace("Entering PositionDiv Function"); //some other code Sys.Debug.trace("Exiting PositionDiv Function"); } </script> http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html 为了看...... [阅读全文]

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 (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 (9):在Web.config文件中注册web用户控件

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


原文地址:How to create an ASP.NET Web User Control and include it in your web page 在上一篇创建web用户控件并包含在web页面里中介绍了如何创建一个web用户控件和在页面使用它。注意:在页面拖拽一个web用户控件后,VS 会在页面上方添加 @Register指令。 http://www.watch-life.net/visual-studio/register-your-asp-net-web-user-controls-in-web-config.html 如果将来移动了web用户控件的位置的话,那么在每个使用了这个web用户控件的页面都需要修...... [阅读全文]

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 (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将会生成如下图所示的代码 ...... [阅读全文]

web developer tips (2):样式应用工具栏的工作模式

原文链接:The Style Application Toolbar works in both Auto a […]


原文链接:The Style Application Toolbar works in both Auto and Manual modes “样式应用工具栏”使你可以自动创建和修改样式,这个工具窗口有自动和手动两种工作模式。 “自动模式”是针对不熟悉CSS的用户, Visual Studio将控制新生成的样式放置位置。 “手工模式”是针对有经验的用户,手动模式下用户可以通过目标规则来控制样式放置位置,目标规则在一个下拉框里显示:类名(当前页),新建自动类,新建级联样式,应用新样式 类名(当前页):所有的样式格式...... [阅读全文]