Hi M,
You can include a namespace by using this sintax:
<% @Import Namespace="CTPCore" %>
Other thing, an assembly does not have function/methods , an assembly has
classes that in turn have methods , if you want to call a method that is a
member of a class then you must create an instance of this class ( unless
that the method be static ) and then you can call the method.
As in your example you have two ways to implement getMyList:
1- declare it in the page itself as you used to do in the old asp days :)
2- declare it in a class on the assembly, declare it as protected or public
, then declare that this page inherit from that other class using a
construction like:
note : I have never tested this before, but it should work
<%@ Page language="c#" AutoEventWireup="false"
Inherits="ASSEMBLY_NAME.CLASS_NAME" %>
Any of these two methods should work fine, now the big question, why you
don't want to use the codebehind mode?
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
[quoted text, click to view] "M" <minnow31@hotmail.com> wrote in message
news:a6ScncXUCZGoTRyiU-KYvA@comcast.com...
> Hello. I need an example of how to call an assembly function/method from a
> webform page. I don't want to use a codebehind (nor embedded c# code),
like
> so:
>
> <asp:DataGrid runat="server" id="Datagrid2" DataSource=<%#
> getMyList(Convert.ToString(DataBinder.Eval(Container.DataItem,
"Location")),
> Convert.ToString(DataBinder.Eval(Container.DataItem, "Type")))%>
> AutoGenerateColumns="false">
>
>
> In the above, getMyList is in a codebehind. Is there a way, and if there
is,
> what is the syntax, to call this method from the assembly c# code, rather
> than the code behind?
>
>
> Thanks in advance.
>
>