can't select controls from dropdown in visual studio for c#


Seeing the attached image...

I'm migrating from vb to c#.

In vb in this dropdown on the left I am able to select a control and then the event on the right hand side and this creates the function in code for me.

Thsi doesn't seem to be an option in c#.

So it seems the only way to create say a button click function is the click the button in design view.

Is there a better way to work with c# than this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
In design view you can highlight a control, go to Properties and click the lightening bolt to see a available events. Double click an event to create the code block in code behind. For Things like GridViews, click the control in the upper right to expand the menu, choose Edit Templates to get to embedded controls in TemplateFields. then click the lightening bolt in Properties to see events.
scm0smlAuthor Commented:
OK yeah that works....

Bit long winded though compared to VB.
Tom BeckCommented:
You can do it the same way in VB projects. At least that's the way it works in VS 2005.
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

scm0smlAuthor Commented:
I'm not saying you can't, I'm just saying there is a quicker way to do it in vb...

You just select the control on the left, the event on the right and creates code for you.

Saves having to go to the .aspx, changing to design view,clicking things and eventually ending up with the function....
Tom BeckCommented:
There has to be a setting where you can turn that bar off an on because I've got it showing in both C# and VB projects.
scm0smlAuthor Commented:
and it has the controls in for c#?

I have the bar but nothing in there..

Does anyone know what that setting is?
Tom BeckCommented:
You're right, the asp controls for C# projects are not listed as they are in VB projects. I never noticed because I never use that bar to create event code blocks.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
scm0smlAuthor Commented:
seems a bit daft to me, why would they be different?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.