I've inherited a asp.net project and I'm finding that the code behind pages contain a lot of business logic.
I've decided that in most cases it's better to leave the working code in place than try and do a massive refactoring. However there are pages that perform functionality that could be re-used in command line utilities for batch processing. I'd like to focus my energies on these pages, refactoring out the business logic and referencing that in other utilities.
I am currently looking to refactor this particular page which has 6200 lines of code in the code behind. What I'm finding is it's very tedious work trying to locate the dependancies between the code behind and the page specific objects.
I'm wondering if anybody knows of a tool, a VS feature, or a method that would allow me to systematically locate and attack these dependancies? Something that will allow me to identify any area of the code that references ViewState, a textbox, panel, drop downlist, etc..., so I can move these references to method parameters and ulitimately move this functionality out of the page class.