设置AutoEventWireup ="假"默认 [英] Setting AutoEventWireup="false" by default

查看:132
本文介绍了设置AutoEventWireup ="假"默认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加一个.aspx页面中或控制的.ascx到我的网站出现在页/控制指令AutoEventWireup属性的默认值是true。有什么办法来改变这个默认值(我大多将该值设置为false)?让我没有我每增加一个页面的时间来手动更改。你可以叫我懒;)

When I add a .aspx page or .ascx control to my website the default value that appears for the AutoEventWireup attribute in the page/control directive is true. Is there any way to change this default value (I mostly set this value to false)? So that I dont have to manually change it each time I add a page. You can call me lazy ;)

感谢

推荐答案

转到下面提到的位置打开WebForm的zip文件并编辑页面,并把所需的值

Go to the below mentioned locations open the WebForm zip file and edit the page and put the required values

Visual Studio的9

Visual Studio 9

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\Web\1033<br/>
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\Web\VisualBasic\1033

Visual Studio的8

Visual Studio 8

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033<br/>
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\Web\VisualBasic\1033



你可以从这里删除该指令,只是启用或从web.config中禁用它们有进一步的控制。

[edit]
You can have further control by removing this directive from here and just enabling or disabling them from web.config

这篇关于设置AutoEventWireup =&QUOT;假&QUOT;默认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆