Solved

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

Posted on 2012-03-26
8
343 Views
Last Modified: 2012-03-27
Hi,

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?
Untitled.png
0
Comment
Question by:scm0sml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 37766113
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.
0
 

Author Comment

by:scm0sml
ID: 37766126
OK yeah that works....

Bit long winded though compared to VB.
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 37766146
You can do it the same way in VB projects. At least that's the way it works in VS 2005.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:scm0sml
ID: 37766170
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....
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 37766274
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.
0
 

Author Comment

by:scm0sml
ID: 37766281
and it has the controls in for c#?

I have the bar but nothing in there..

Does anyone know what that setting is?
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 37766342
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.
0
 

Author Comment

by:scm0sml
ID: 37766402
seems a bit daft to me, why would they be different?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question