Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 7th, 2008, 04:15 AM
Scott M.
Guest
 
Posts: n/a
Default Page Class Events

How can I get Visual Studio 2008 Pro. to show me a list of the Page class's
events (as I can get in VB .NET)?

In the page designer, with the DOCUMENT selected in the Properties Window,
there is no lighning bolt icon to switch over to the events for the selected
object (the bolt is there for any other server objects I select).

In code view, if I drop down the top-left dropdown, I see only my instance
of the page listed, but in the top-right dropdown, it does not list the
events available, only those methods that I have already set up.

What am I missing?


  #2  
Old September 7th, 2008, 11:55 PM
Nathan Sokalski
Guest
 
Posts: n/a
Default Re: Page Class Events

I have not yet upgraded from 2005 to 2008, but I believe that the way Visual
Studio does the dropdowns in codebehind is that VB.NET gives you the ability
to select events from the right dropdown for the object selected in the left
dropdown, but C# does not give you this option. Based on what you are
saying, it sounds like you were forced to switch from VB.NET to C# (I was
also at my new job). I have found that the best workaround for Page events
is to type override and then select the event method (such as OnInit) from
the list shown. If you press enter when the desired event method is
selected, it will place the signature in your codebehind for you. It's not
what we want, but C# apparently doesn't like convenience for events. Good
Luck!
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

"Scott M." <s-mar@nospam.nospamwrote in message
news:u9vn6YJEJHA.1272@TK2MSFTNGP02.phx.gbl...
Quote:
How can I get Visual Studio 2008 Pro. to show me a list of the Page
class's events (as I can get in VB .NET)?
>
In the page designer, with the DOCUMENT selected in the Properties Window,
there is no lighning bolt icon to switch over to the events for the
selected object (the bolt is there for any other server objects I select).
>
In code view, if I drop down the top-left dropdown, I see only my instance
of the page listed, but in the top-right dropdown, it does not list the
events available, only those methods that I have already set up.
>
What am I missing?
>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles