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
Aboulfazl Hadi - 15 Feb 2006 09:16 GMT
Hi
Use Import Directive :
<%@ Import Namespace="MyNameSpace" %>
let me know if it is useful for you
A.Hadi
DWS - 15 Feb 2006 13:51 GMT
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
> Hi all.
>
[quoted text clipped - 15 lines]
> Cheers,
> Adam