How to reference a function from the ASPX page

How to reference a function from the ASPX page

am 18.01.2008 16:21:58 von Larry Bud

Let's say I have a text box

OnPreRender="RunThisFunction" >

The function RunThisFunction is in a common module (in a separate .vb
file) and I want it to execute on a prerender.

But when the page compiles, it doesn't find RunThisFunction. How can
I reference it?

Re: How to reference a function from the ASPX page

am 18.01.2008 16:30:56 von grava

"Larry Bud" wrote in message
news:12488fde-b8b6-452d-9c19-4d3480ab8505@d70g2000hsb.google groups.com...
> Let's say I have a text box
>
> > OnPreRender="RunThisFunction" >
>
> The function RunThisFunction is in a common module (in a separate .vb
> file) and I want it to execute on a prerender.
>
> But when the page compiles, it doesn't find RunThisFunction. How can
> I reference it?

I think you have to wrap the method call in your code behind file ... even
if the implementation is in another class

on your code behind:

protected void RunThisFunction (object sender, eventargs e)
{
// outer method call.
}

HTH

--
Gianluca Gravina
http://blogs.ugidotnet.org/thinkingingrava

RE: How to reference a function from the ASPX page

am 18.01.2008 17:53:01 von brucebarker

you need to fully qualify the function name.

..

-- bruce (sqlwork.com)


"Larry Bud" wrote:

> Let's say I have a text box
>
> > OnPreRender="RunThisFunction" >
>
> The function RunThisFunction is in a common module (in a separate .vb
> file) and I want it to execute on a prerender.
>
> But when the page compiles, it doesn't find RunThisFunction. How can
> I reference it?
>

Re: How to reference a function from the ASPX page

am 24.01.2008 15:28:49 von Larry Bud

>
>
> "Larry Bud" wrote:
> > Let's say I have a text box
>
> > > > OnPreRender=3D"RunThisFunction" >
>
> > The function RunThisFunction is in a common module (in a separate .vb
> > file) and I want it to execute on a prerender.
>
> > But when the page compiles, it doesn't find RunThisFunction. =A0How can
> > I reference it?- Hide quoted text -
On Jan 18, 11:53 am, bruce barker
wrote:
> you need to fully qualify the function name.
>
> ..

How do I know what namespace it's in if I just have a separate .vb
file that declares a module and a function?