Setting AutoEventWireup from codebehind
am 20.06.2007 22:12:46 von WTHello,
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
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
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
> >
> >
> >
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
>
>
>
Thanks, That's also what I found, I will try to deal with this limitation
using web.config.
CS
"Milosz Skalecki [MCAD]"
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
>> >
>> >
>> >
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.