Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-26
8
Medium Priority
?
347 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

926 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