PC Review


Reply
Thread Tools Rate Thread

How do I associate for example the load event to a handler when I have AutoEventWireup="false"

 
 
Tony Johansson
Guest
Posts: n/a
 
      3rd May 2011
Hello!

This is a asp.net question that might somebody knows.

If I set the AutoEventWireup="false" I must do the wiring between the event
and the eventhandler myself.
So if I want to associate the Load event to a eventhandler that is called
Do_Load how to I do that in code ?

//Tony


 
Reply With Quote
 
 
 
 
Tony Johansson
Guest
Posts: n/a
 
      3rd May 2011

"Peter Duniho" <(E-Mail Removed)> skrev i meddelandet
news:(E-Mail Removed)...
> On 5/3/11 1:41 AM, Tony Johansson wrote:
>> Hello!
>>
>> This is a asp.net question that might somebody knows.
>>
>> If I set the AutoEventWireup="false" I must do the wiring between the
>> event
>> and the eventhandler myself.
>> So if I want to associate the Load event to a eventhandler that is called
>> Do_Load how to I do that in code ?

>
> It's just like events for any other C# code:
>
> objectWithEvent.Load += Do_Load.


I first put association in the global section but this will gave an error I
just use the c-tor.
this.Load += Do_Load;

//Tony

//Tony


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do subforms have a "load" or "made visible" event? =?Utf-8?B?TWF1cnkgTWFya293aXR6?= Microsoft Access 3 31st May 2007 06:04 PM
"magnet:" URI handler false positive (not Grokster!) in registry Philippe. Spyware Application Compatibility 0 15th Jan 2005 07:35 PM
User Control Page_Load Twice AutoEventWireup="false" SmartNavigation="true" magister Microsoft ASP .NET 2 1st Nov 2004 11:56 AM
using the "quit" method during the form "on load" event =?Utf-8?B?ZG90dW4=?= Microsoft Access VBA Modules 0 15th Jan 2004 12:56 PM
Re: translating from C# to vb.net (event handler code) - "Form1.vb" 6645 Bytes Mountain Bikn' Guy Microsoft C# .NET 0 16th Dec 2003 06:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:44 AM.