Last post Jul 10, 2010 06:13 AM by rscott54
Jul 09, 2010 10:58 PM|rscott54|LINK
I've been using Visual Web Developer to build a site in VB.Net. Now I am trying to learn C#.Net. When I create an aspx page in VB and then switch to the code-behind, the (General) dropdown box at top lists all of the objects on my page. I can select an
object, then the (Declarations) dropdown lists all of the available events for that object. When I choose one, it creates the Sub for that event in the code-behind.
In my C# project, after I create the aspx page and switch to the code-behind, the left dropdown does not list any of the objects on the page. The right dropdown does list objects, but when I choose one it jumps back to the aspx page. It only lists events
if I have manually coded them.
Do I have a setting wrong somewhere, or does the designer not work the same for C# as VB? And if so, how do I find the available events that can be coded?
web developer 2008
Jul 10, 2010 01:21 AM|HeartattacK|LINK
They do work differently.
Switch to design view of the aspx page. Select any aspx control, right click and choose properties. In the properties window, near the top you should see a yellow thunder icon. Click that and it'll give you a list of events. Double click the textbox next
to the event name to generate and hook up a handler.
Jul 10, 2010 06:13 AM|rscott54|LINK
Thanks for the instructions. I tried this method and it does what I was looking for. Thank you very much for the reply!