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

Discussion in 'ASP .Net' started by bminder, Jun 24, 2005.

  1. bminder

    bminder Guest

    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
     
    bminder, Jun 24, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Dev
    Replies:
    3
    Views:
    16,142
    Gandalf
    Feb 8, 2004
  2. ce
    Replies:
    1
    Views:
    2,998
  3. Electrified Research
    Replies:
    5
    Views:
    2,471
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 11, 2005
  4. Replies:
    1
    Views:
    3,239
    PeterKellner
    May 16, 2006
  5. Nathan Sokalski
    Replies:
    5
    Views:
    1,044
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
Loading...

Share This Page