ASP.NET 2.0: master pages and web user controls: reference to a non-shared member requires an object

B

bminder

Hello,

Why would a web user control and master page not have access to a shared
method in a library, when all regular pages do?

For example, i have a library which has public class AAA. Public class AAA
has a shared method ReturnString() which the asp.net pages can use fine, but
the master page and web user controls cannot.

VS2005's source view shows that the master page and web user controls have
an error:

"reference to a non-shared member requires an object reference"

when doing <%=AAA.ReturnString()%>, but the "normal" web pages dont have
this issue.

It's got me stumped.

Thanks for any help,

bminder
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top