Does not contain a definition for an object, but the object is there!
Posted on 2007-07-30
I am running into a problem I can't seem to solve.
I am using Visual Studio 2005 and have a fairly large webform solution in development. On one of my webforms I have added objects, a grid view and sqldatasource if it matters. when I am coding the tool tips helper sees the objects when I am typing, showing me all their methods/properties/etc;; but when I compile the code I get "AdminDivision does not contain a definition for 'sdsDDLApprovers'". However, when I answer yes to continue at compilation to continue on and view the web solution the page works fine, I can even use the object that are throwing the error when compiling in VS 2005!! AdminDivision is the webform and sdsDDLApproveres is an SQLDataSource placed on the webform. I have other gridviews and sqldatasources on the webform, clearly named differently, and which don't throw errors when compiling. and I am not missing a method or anything like that, I believe, its the actual object as stated in my quote above that is throwing the error.
I have looked to see if there is some way to get to the generated code, the 'hidden' generated code in VS 2003 that handled all the object creations/instantiations, but I can't seem to get to it in VS 2005.
Soooo, What is my problem? And IS there hidden code that you can edit in VS 2005 that I can't find?
I will be glad to post code, files, pics, etc. but it would seem to me a more general problem concerning VS 2005. I just don't get how it can be throwing an error butr still work when I go past the errors!