By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,338 Members | 1,346 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,338 IT Pros & Developers. It's quick & easy.

Selecting events

P: n/a
I'm a VB.Net developer learning C# so this is another newbie question....
(using 1.1)

I posted a question about how to paste definitions for events in C# because
in VB we use the vs.net left dropdown for the object (Page, btnpush, etc)
and the right dropdown for the event we want. Simple!

I was told that in C# the left dropdown has basically nothing, we choose the
object in the right dropdown, and then push the little lightning icon for
the events for that object. That works for a lot of things but what about
Page objects? I want to paste the event definitions for Page_PreRender for
instance. The right dropdown does not have the Page object listed (as does
the left dropdown in VB).

Thanks,
T
May 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
When using ASP.Net and C# you can get to the events by going to the page's
code behind and typing
"override" and a space. A intellisense dropdown list will appear giving a
list of all the base events, methods and properties of the System.Web.UI.Page
class. Here you can select OnPreRender and the stub event will appear in the
IDE for you to override with your own code. There are other ways to override
also.

When using Windows Forms you can select a control in the designer and view
the properties. The properties window has an "events" button at the top to
view only events. Select this and you will be presented all the events for
the control. Double click on the event name and the event stub will appear in
the IDE.

Hope this helps.

SMC750
www.certdev.com

Tina wrote:
I'm a VB.Net developer learning C# so this is another newbie question....
(using 1.1)

I posted a question about how to paste definitions for events in C# because
in VB we use the vs.net left dropdown for the object (Page, btnpush, etc)
and the right dropdown for the event we want. Simple!

I was told that in C# the left dropdown has basically nothing, we choose the
object in the right dropdown, and then push the little lightning icon for
the events for that object. That works for a lot of things but what about
Page objects? I want to paste the event definitions for Page_PreRender for
instance. The right dropdown does not have the Page object listed (as does
the left dropdown in VB).

Thanks,
T


--
smc750
www.certdev.com

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1
May 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.