PC Review


Reply
Thread Tools Rate Thread

Controls Cut Paste removes Event Handlers

 
 
rawCoder
Guest
Posts: n/a
 
      29th Aug 2004
Hi All,

Create a Form
Add a Button
Double Click the button to create its Event Handler ( Button1_Click )
Now come to design view and Cut the Button
Then Paste it again
Now double click the Button
Notice that there is a new handler ( Button1_Click_1 ) just below the
old handler :-(

ok this might not be a bug , rather a functionality.
(i.e. removing the Handler when control is removed, and not RE-ATTACHED when
the control is created again. )

But, is it still there in VS 2005 ?

Thanx
rawCoder


 
Reply With Quote
 
 
 
 
Lateralus [MCAD]
Guest
Posts: n/a
 
      30th Aug 2004
I think that this is by design. The problem is that there is already a
method named Button1_Click. It can't assume that is what you want to use, so
it creates a new one.

--
Lateralus [MCAD]


"rawCoder" <(E-Mail Removed)> wrote in message
news:et%(E-Mail Removed)...
> Hi All,
>
> Create a Form
> Add a Button
> Double Click the button to create its Event Handler ( Button1_Click )
> Now come to design view and Cut the Button
> Then Paste it again
> Now double click the Button
> Notice that there is a new handler ( Button1_Click_1 ) just below the
> old handler :-(
>
> ok this might not be a bug , rather a functionality.
> (i.e. removing the Handler when control is removed, and not RE-ATTACHED
> when
> the control is created again. )
>
> But, is it still there in VS 2005 ?
>
> Thanx
> rawCoder
>
>



 
Reply With Quote
 
One Handed Man \( OHM - Terry Burns \)
Guest
Posts: n/a
 
      30th Aug 2004
No, this does not happen in VS2005 ( at least not in the Beta1 release )


--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"rawCoder" <(E-Mail Removed)> wrote in message
news:et%(E-Mail Removed)...
> Hi All,
>
> Create a Form
> Add a Button
> Double Click the button to create its Event Handler ( Button1_Click )
> Now come to design view and Cut the Button
> Then Paste it again
> Now double click the Button
> Notice that there is a new handler ( Button1_Click_1 ) just below the
> old handler :-(
>
> ok this might not be a bug , rather a functionality.
> (i.e. removing the Handler when control is removed, and not RE-ATTACHED

when
> the control is created again. )
>
> But, is it still there in VS 2005 ?
>
> Thanx
> rawCoder
>
>



 
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
Event handlers and dynamically created controls =?Utf-8?B?TWlrZSBSYW5k?= Microsoft ASP .NET 2 26th Jan 2007 08:31 PM
Compisite Custom Controls - Event Handlers Mr Newbie Microsoft Dot NET Framework 1 6th Nov 2005 03:23 PM
Controls Cut Paste removes Event Handlers rawCoder Microsoft C# .NET 2 30th Aug 2004 05:18 PM
adding event handlers for windows controls Peter Foot [MVP] Microsoft Dot NET Compact Framework 2 22nd Apr 2004 08:01 PM
How do you add event handlers for controls generated with xsl? MikeC Microsoft C# .NET 0 5th Jan 2004 09:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:06 AM.