Page level event handlers with VS2005

Until recently I could not find a way to add a page level event handler for a ASP.NET 2.0 web page. I mean, you can type it if you know what the name of the event and the signature of the delegate/event is. But for people without a photographic memory it is convenient to click your way to an event handler in Visual Studio 2005. Or if you are lazy, like me.


It is a no-brainer in VS.NET 2003. Select the Page object in the properties window, switch to Events with the lightning bolt button and voila. But, … in VS2005 the Page object is not in the dropdown. :O How do you add the page event handlers, then? I looked for it and could not find it, until recently. Weew, a long intro for a short and simply task. Here’s how:


Right-click your web page in the Solution Explorer. Select the View Component Designer. Here you can click the lightning bolt button like before and add all of your favorite event handlers. That’s it. Fairly hidden if you ask me.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s