Click here to Skip to main content
Licence 
First Posted 2 Mar 2004
Views 29,236
Bookmarked 6 times

Page Focus Add-in for ASP.NET Projects

By | 2 Mar 2004 | Article
The currently edited page becomes the start page at debug time.

Sample Image - pagefocus.jpg

The Situation

Working on an ASP.NET project, I had to focus on debugging a particular web form at a specific moment. I made the necessary changes to the .aspx (or .aspx.cs) file and then I hit the fifth functional key in order to see how the things evolved. Well, the image I saw was not exactly the one I was working on...

The Explanation

The page automatically loaded when debugging starts has to be specified by setting the Properties/Configuration Properties/Debugging/Start Page property. It's a pretty long way to go there and it has to be written by hand because no Open File dialog is available.

An alternative solution would be to provide a link from the Start Page to the current page, or to write its path in the browser address field, but this is not as painless as it can get.

The Add-in

When installed, it registers an item in the Tools menu. This item will provide the same functionality as the classical Debug/Start option but, before the debugging starts, it will also make sure that the currently edited web form is set as the Start Page option. If no .aspx or .aspx.cs file is under surgery, then it makes no change in the properties.

The option is available only when a project is loaded, and it works like Debug/Start with any other type of project; therefore you can safely "move" the F5 shortcut to the add-in's item, if you think it's appropriate.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Bogdan Rechi

Software Developer (Senior)

Europe Europe

Member

Working on a dream...

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 3 Mar 2004
Article Copyright 2004 by Bogdan Rechi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid