Setting AutoEventWireup from codebehind

  • Thread starter Thread starter WT
  • Start date Start date
W

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
 
WT,

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

Regards
 
Thanks, That's also what I found, I will try to deal with this limitation
using web.config.
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.aspx


Regards,
Walter Wang ([email protected], 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top