...

c# control handling

Brett Bretterso
10-21-2005, 05:19 PM
Before I've been doing my codebehind in vb.net, but I'm wanting to migrate to C#. I'm not currently in a situation where I can test my pages (the stuff I need is in the mail), but I'm trying to write as much of the program I'm working on now so when I can test it I just have to work out bugs rather than start from scratch.

In vb.net with your subs you put after the name and parameters Handles.button1, but in my research I'm not seeing anything that would correspond with Handles for C#. I just want to know how to let C# know that this is what needs to run when I click this button.

Thanks for the help,

Brett Bretterson

Brandoe85
10-21-2005, 05:27 PM
You add new event handler, slightly different than vb:

this.Button1.Click += new System.EventHandler(this.Button1_Click);

Button1_Click is what's going to be ran when you click the button.

Good luck

Brett Bretterso
10-21-2005, 05:37 PM
Thanks a lot,

Brett Bretterson



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum