Setting AutoEventWireup from codebehind

Setting AutoEventWireup from codebehind

am 20.06.2007 22:12:46 von WT

Hello,

Is there a way to set autoeventwireup from codebehind selectively.
I want to set it to false for all usercontrols in my application.

Thanks for idea.
CS

RE: Setting AutoEventWireup from codebehind

am 21.06.2007 01:05:55 von mily242

Forgot to mention autoEventWireup is settable from web.config.
--
Milosz


"Milosz Skalecki [MCAD]" wrote:

> WT,
>
> No, because it is simply used by page compiler which assigns event handlers
> before page is run.
>
> Regards
> --
> Milosz
>
>
> "WT" wrote:
>
> > Hello,
> >
> > Is there a way to set autoeventwireup from codebehind selectively.
> > I want to set it to false for all usercontrols in my application.
> >
> > Thanks for idea.
> > CS
> >
> >
> >

RE: Setting AutoEventWireup from codebehind

am 21.06.2007 01:05:56 von mily242

WT,

No, because it is simply used by page compiler which assigns event handlers
before page is run.

Regards
--
Milosz


"WT" wrote:

> Hello,
>
> Is there a way to set autoeventwireup from codebehind selectively.
> I want to set it to false for all usercontrols in my application.
>
> Thanks for idea.
> CS
>
>
>

Re: Setting AutoEventWireup from codebehind

am 21.06.2007 08:01:41 von WT

Thanks, That's also what I found, I will try to deal with this limitation
using web.config.
CS
"Milosz Skalecki [MCAD]" a écrit dans le message
de news: F257B373-BBA4-4764-8C68-A9999DB9EE33@microsoft.com...
> Forgot to mention autoEventWireup is settable from web.config.
> --
> Milosz
>
>
> "Milosz Skalecki [MCAD]" wrote:
>
>> WT,
>>
>> No, because it is simply used by page compiler which assigns event
>> handlers
>> before page is run.
>>
>> Regards
>> --
>> Milosz
>>
>>
>> "WT" wrote:
>>
>> > Hello,
>> >
>> > Is there a way to set autoeventwireup from codebehind selectively.
>> > I want to set it to false for all usercontrols in my application.
>> >
>> > Thanks for idea.
>> > CS
>> >
>> >
>> >

RE: Setting AutoEventWireup from codebehind

am 21.06.2007 08:29:57 von wawang

Hi CS,

As Milosz pointed out, you cannot use code-behind to change this
AutoEventWireup attribute as it's used before page compilation phase.


You may find following article useful regarding AutoEventWireup:

#K. Scott Allen : Inside AutoEventWireup
http://odetocode.com/Blogs/scott/archive/2006/02/16/2914.asp x


Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.