?
Solved

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

Posted on 2012-03-26
8
Medium Priority
?
344 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
Industry Leaders: 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 2000 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

Technology Partners: 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!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

771 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