Riain McAtamney
Riain McAtamney

Reputation: 6432

Setting AutoEventWireup="false" by default

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 ;)

Thanks

Upvotes: 6

Views: 936

Answers (1)

Binoj Antony
Binoj Antony

Reputation: 16204

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

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

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

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

Upvotes: 10

Related Questions