Static Methods!!!

A

Adam J Knight

Hi all.

I have created an assembly that contains a helper class (myTestClass)

I have created a reference to this Assembly in vs2003. and included a 'using
MyNameSpace;' entry in my code behind.

Problem: I can't seem to access the static methods of this class:

I am trying to use these methods like so:
<asp:DropDowList ID="Test" DataSource="<%# myTestClass.HelperMethod() %>"
Runat="server"/>

Error: The name 'myTestClass' does not exist in the current context

What am i missing???

Cheers,
Adam
 
A

Aboulfazl Hadi

Hi
Use Import Directive :
<%@ Import Namespace="MyNameSpace" %>

let me know if it is useful for you
A.Hadi
 
G

Guest

Your missing the intellisence provided by the ide. Your missing this is
aspnet group post to another group this is ASP code <%#
myTestClass.HelperMethod() %> Its outdated, obsolete, and for backwards
compatibility only.

You can set your control datasource in the page_init event and the ide would
tell you more about your error at design time and not bother us with your
backwards compatibility no intellisence compiles but does not run ASP
development techniques.

DWS
 

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