Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   asp.net 2005 question re: "reference to a non-shared member requires an object reference" (http://www.velocityreviews.com/forums/t105210-asp-net-2005-question-re-reference-to-a-non-shared-member-requires-an-object-reference.html)

ce 06-23-2005 12:46 AM

asp.net 2005 question re: "reference to a non-shared member requires an object reference"
 
I've got a class "A" which has a shared (static) method "Test". In an
asp.net page i can use it like so:

<td><%=A.Test()%></td>

and all is fine, but if instead of a page it's an ascx (control) then i get
the following error in the same scenario:

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

Any ideas why?

I'm using vb.net 2005 if that's any significance.

Thanks,

Chris





ce 06-23-2005 09:15 PM

Re: asp.net 2005 question re: "reference to a non-shared member requires an object reference"
 
Also, I'm using IIS 5.1 with ASP.NET 2.0 Beta 2.


Brent Minder BugMonitor.com, Inc. PO Box 1168 Duluth, GA 30096 Phone
404.234.0540 We make your software better.
"ce" <cevans@bugmonitor.com> wrote in message
news:LAnue.1358$_m1.276@bignews6.bellsouth.net...
> I've got a class "A" which has a shared (static) method "Test". In an
> asp.net page i can use it like so:
>
> <td><%=A.Test()%></td>
>
> and all is fine, but if instead of a page it's an ascx (control) then i
> get the following error in the same scenario:
>
> "reference to a non-shared member requires an object reference".
>
> Any ideas why?
>
> I'm using vb.net 2005 if that's any significance.
>
> Thanks,
>
> Chris
>
>
>
>





All times are GMT. The time now is 08:10 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.