views:

11

answers:

1

I have a large brown field webforms app that uses ObjectDatasource controls all over the place, which makes refactoring more difficult than it should be.

Is there a way to get a comile-time failures if an object or method is renamed which would cause the ObjectDataSource no longer work? In MVC there is the notion of compiling views, is there a parallel to this for webforms?

A: 

There is no easy way, no. Anything defined in .ASPX or .ASCX is created at runtime. The only thing you could do is attempt to access the object in codebehind (assuming a Web Application Project) and make sure the project compiles OK. But that only tells you if it's defined correctly in the .design code-behind file; it won't help you track down any references to it in .ASPX or .ASCX files.

Bryan