sivakumarl Posted March 16, 2004 Posted March 16, 2004 HI, Please tell me how i could write the events for the controls in c#.net In VB.net all the events corresponding to the control are shown in the IDE where as in c#.net those events are not visiible in the IDE. Even if i wrote the event manullay it does not detect the functionality. I request some one to please clarify my query. Thank you, Quote
Administrators PlausiblyDamp Posted March 16, 2004 Administrators Posted March 16, 2004 Easiest way is in the IDE bring up the property windows (F4 by default). You should see a button on the property window that looks like a yellow zigzag thing, click this and you will see the controls events - just double click the event in question. The reason adding them in code doesn't work is you also need to associate the event handler with the event. e.g. //given the following event handler private void button1_Click(object sender, System.EventArgs e) { } //the following code would need to be executed to associate them together this.button1.Click += new System.EventHandler(this.button1_Click); using the IDE will automatically do this for you though. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.