标签归档:web developer tips

web developer tips (54):取消HTML/ CSS编辑器的智能提示

原文地址:How you can turn off intellisense for HTML/ CSS ed […]


原文地址: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+常规,不选中“自动列出成员”和“参数信息”项。 ...... [阅读全文]

web developer tips (53):在vs的设计视图编辑gridview的模板

原文地址:How to edit the templates for gridview in VS desig […]


原文地址:How to edit the templates for gridview in VS designer 通过模板的呈现,可以灵活地配置Gridview控件。下面的步骤将显示在Visual Studio 的设计视图如何编辑gridview的模板(template)。 http://www.watch-life.net/visual-studio/edit-the-templates-for-gridview-in-vs-designer.html 1、这里 GridView链接到了一个数据源Sqldatasource:Northwind.products,在配置sql 数据源时,选择“生成插入”、“更新”、“删除”语句。 ...... [阅读全文]

web developer tips (52):部署Asp.net web应用须设置debug为false

原文地址:When deploying your ASP.NET web application, debug […]


原文地址:When deploying your ASP.NET web application, debug=false should be set in web.config 为了解决程序的问题,开发人员通常在web.config 中启动调试(debug)模式,这将导致ASP.NET产生诸如调试符号、元数据等的额外信息。然而,性能上会的花费更长的时间去进行编译和运行,消耗更多的内存,缓存资源无法执行。因此,在发布产品时,应该把调试设置为"false"避免对性能的影响。有两个方法可以实现这一目标: http://www.watch-life.net/visual-studio/deploying-y...... [阅读全文]

web developer tips (51):使用vs2005和IE8进行调试

原文地址: how to use VS2005 to debug with IE8 由于IE8默认设置下的散偶 […]


原文地址: how to use VS2005 to debug with IE8 由于IE8默认设置下的散偶合功能,导致vs2005不能通过IE8进行调试。如果想启动调试(debug),请按如下步骤操作: 1、打开注册表编辑器 2、打开键 HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main 3、增加一个名为“ TabProcGrowth ”的dword 值 4、设置“ TabProcGrowth ”的值为0 同时,在调试的时候,不要忘记启动脚本调试功能(IE菜单:工具+选项+高级,不选中“禁用脚本功能(Internet Explorer)”)。 另:不能调试也可能是IE增强安全配置导致的,参见...... [阅读全文]

web developer tips (50):在 Visual Studio 的设计视图绝对定位控件

原文地址:How to absolute position the controls in Visual St […]


原文地址:How to absolute position the controls in Visual Studio Designer 在设计视图,控件绝对定位看起来比较混乱直到你了解可视化的相关提示。在设计视图里,你可以通过拖动控件进行如下两个操作之一: 1、改变控件的起始。 2、改变控件的位置。 http://www.watch-life.net/visual-studio/absolute-position-the-controls-in-visual-studio-designer.html 当你拖动控件体的时候,可以改变控件的起始,你可以看到这一点,是因为在白色的方格子里光标变成了小箭头。 ...... [阅读全文]

web developer tips (49):将JS函数的左大括号置于新行

原文地址: how to set the editor to always place open braces […]


原文地址: how to set the editor to always place open braces on new line for functions in JScript? 在 Visual Studio 2008 ,菜单:工具+选项+文本编辑器+Jscript+格式设置,在“新行”选择中,选中“将函数的左大括号置于新行”。 http://www.watch-life.net/visual-studio/set-the-editor-to-always-place-open-braces-on-new-line-for-functions-in-jscript.html ...... [阅读全文]

web developer tips (48):IIS7应用程序池的“Ping”设置可能影响调试

原文地址:that IIS7 application pool’s “Ping” settings may a […]


原文地址:that IIS7 application pool’s “Ping” settings may affect IIS7 based website or application debugging 对于非响应的应用程序( application pool),默认情况下,IIS7有个1.5分钟的窗口。在IIS的web应用和网站调试期间,我们可能要改变其应用程序池的高级设置,比如设置“Ping的最大响应时间”给一个更大的值,或者设置“启用ping”为“false”。 http://www.watch-life.net/visual-studio/iis7-application-pool-s-ping-settings-may-affect-debugging.html ...... [阅读全文]

web developer tips (47):脚本远程调试需关闭IE增强安全配置

原文地址:that front page script remote debugging requires t […]


原文地址:that front page script remote debugging requires turning off IE’s Enhanced Security Configuration in windows 2003 and windows 2008 在windows2003或windows 2008 中用 visual studio 2008 调试远程前台页面的时候,有时发现脚本的断点无法命中。一个很可能的原因是需要关闭IE的增强安全配置(Enhanced Security Configuration)。 http://www.watch-life.net/visual-studio/turning-off-ie-s-enhanced-security-configuration.html 在windows 2003 关闭IE的增强安全配置:开始---设置---控制面板---添加删除程序---添加删除windows组件---不选中“I...... [阅读全文]

web developer tips (46):使用Web Deployment Tool进行Web部署迁移

原文地址:that Web Deployment “migrate” operation is “sync” […]


原文地址:that Web Deployment “migrate” operation is “sync” operation with all migration rules enabled 从IIS6 迁移一个应用或整个服务器到 IIS7,需要使用“msdeploy”命令行工具来完成迁移(migrate)。 例如,你可以在服务器上建一个“migration”的包,如下: msdeploy -verb:sync -source:webserver60 -dest:package=c:\migratedServer.zip 迁移意味着移动更多组件,然后进行同步。有关使用 Web Deployment Tool 进行部署迁移请参阅: Migrate from IIS 6.0 to IIS 7.0 同样的在C#里可以使用web部署的公用的APIs,你可以写C#进行同步(sync),只是需要启用所有的迁移规则。c#...... [阅读全文]

web developer tips (45):如何改变动态数据文件夹的位置

原文地址:How to change the DynamicData folder location? ASP […]


原文地址:How to change the DynamicData folder location? ASP.NET 动态数据(Dynamic Data )是一种更容易创建数据的ASP.NET web应用。 默认情况下,动态数据放在web应用的动态数据目录里,该目录创建在根目录处。你的应用也许需要移动的不同的位置。 以下步骤是在 VS 2008 SP1中实现: http://www.watch-life.net/visual-studio/change-the-dynamicdata-folder-location.html 1、选择一你想移动的目录,在这个例子中,我们选择的是"admin"目录,创建一个名为“admin”的目录,把动态数据移动到这个目录 2、在Global.asax 里加入如下...... [阅读全文]

web developer tips (44):如何在Visual Studio中查看项目文件

原文地址:How to view the Project File while still in Visual […]


原文地址:How to view the Project File while still in Visual Studio 如果你正在开发的网站是web应用,在这种模式下项目文件是构成整体所必需的部分。作为web应用项目的一部分这个一个文件必须包含在项目文件夹里,里面包含程序集的引用和其他项目元数据的设置。如果网站的文件系统的根目录存在一个文件,但不包含在项目文件,将不被视为项目的一部分,也不会包含在MSBuild的编译进程。 因此项目文件是如此重要,那么如何查看文件或手工编辑项目文件整个期间,仍...... [阅读全文]

web developer tips (43):通过请求处理管道注册IHttpModule

原文地址:The way you register your IHttpModule depends on t […]


原文地址:The way you register your IHttpModule depends on the request processing pipeline in which your module will run 建立和运行自定义IHttpModule需要做三件简单的事: 1、把源码编译成dll。 2、在net里注册。 3、在IIS配置系统里注册。 http://www.watch-life.net/visual-studio/register-your-ihttpmodule-depends-on-the-pipeline.html 1)假定你有个简单的模块,在验证发生之前,触发一个用HttpContext 做参数的事件,在BeginRequest事件写如下代码: public void Init(HttpApplication context) { context.BeginRequest += new System.EventHandler(context_...... [阅读全文]

web developer tips (42):用IIS配置编辑器生成脚本来更新配置

原文地址:ConfigurationEditor allows you to generate C#, Jav […]


原文地址:ConfigurationEditor allows you to generate C#, JavaScript or AppCmd script to update configuration 如果你想写段脚本来添加或更新已经存在的配置,无论配置文件属于那种类型的,比如 administration.config, applicationHost.config 或 网站 或 应用程序的 web.config),你都可以安装配置编辑器(Configuration Editor)来实现,它是IIS管理包的一部分,使用"生成脚本"的功能,用来更新配置,真的是非常有用的功能。 有关IIS配置编辑器模块的安装和下载见: ...... [阅读全文]

web developer tips (41):用自颁发的证书连接到远程IIS服务器

原文地址:establishing a remote connection to a IIS server w […]


原文地址:establishing a remote connection to a IIS server with self-issued certificate will require a certificate validation delegate 要么通过WMSvc 要么通过自己的脚本,当你尝试与远程服务器建立一个连接,没有提供受信任的证书,你需要提供证书验证的委托,用来检查不受信任的证书。 http://www.watch-life.net/visual-studio/establishing-a-remote-connection-to-a-iis-server-with-self-issued-certificate.html 这个委托的签名如下: Namespace:...... [阅读全文]

web developer tips (40):定义母版页的作用范围

原文地址:How to scope master pages 母版页是一个模板页,可以用于创建一致布局的的应用 […]


原文地址:How to scope master pages 母版页是一个模板页,可以用于创建一致布局的的应用程序。首先,创建一个母版页来定义应用程序的外观,然后创建一个包含当前内容的内容页。 你可以用以下三个级别,把这些内容页附加到母版页里: http://www.watch-life.net/life-thinking/know-how-to-scope-master-pages.html 1、页面级(Page Level):你可以在每个内容也使用如下页面指令: <@Page Language="VB" MasterPageFile="~...... [阅读全文]