can the object browser find user controls?

T

tbh

hi, hope this cross-post is OK. it's unclear to me whether this question
belongs more under vstudio or dotnet...

i'm using VS2005 pro and am one co-developer of a web solution that is
getting to be at least medium sized. (about 60k lines of C# in the solution
itself and perhaps another 20k lines in libraries we've developed.)

finding classes we've built can be challenging at times and in theory the
object browser should be my friend.

i don't seem to find classes in user controls, however. (if so, this is yet
another drawback of user controls -- along with limits on refactoring, "go
to definition" and others.) we use our own user controls extensively to
avoid re-building the whole solution during development (which alas happens
anytime even a harmless space is added to a .cs file under app_code.)

can anyone shed light on this? (i realize this might be a symptom of our
choice of work-around; maybe there are better approaches than using user
controls; we're open to suggestions there too.)

cheers,

Tim
 
S

Steven Cheng[MSFT]

Hello Tim,

From your description, you have a large ASP.NET project which has use some
ascx usercontrols, however, you found that the objectbrowser in IDE can not
find those usercontrol classes (as other normal component class in app_code
or referenced class library project), correct?

As for this issue, based on my understanding, it it likely due to the new
class compilation model of ASP.NET 2.0 pages and usercontrol. You can find
that in ASP.NET 2.0, the web application use dynamic compilation, and the
aspx page and ascx usercontrol are using the partial class (new in .net
2.0). As for partial class, it is determined by multiple source files, and
for ASP.NET aspx page/ascx usercontrol, they're more particular, they're
consist of aspx/ascx template and a codebehind file, this make the IDE can
not figure out the complete class at design-time. Therefore the
objectbrowser or the Class Viewer of VS 2005 can not list those page and
usercontrol's codebehind class.

I'm not sure whether your project will consider using a base
class(non-partial) for each usercontrol, if so, such a base class(in
App_Code or in a class library project) can be listed in object browser or
class viewer.

Anyway, I'll help you consult some other ASPNET/devenv engineers to see
whether we can find any other means to workaround the this issue.

I'll update you as soon as I get any update.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello Tim,

Have you got any further ideas on this issue? Please feel free to post
here if there is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top