Solved

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

Posted on 2012-03-26
8
333 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
  • 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now