Selecting events

T

Tina

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
 
S

smc750 via DotNetMonster.com

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
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/Forums.aspx/dotnet-csharp/200605/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top