Re: Accessing functions defined in Global.asax
From: Ryan Walberg (generalpf_at_nospam.yahoo.com.nospam)
Date: 02/04/04
- Next message: Ryan Walberg: "Re: Eventhandling in Page hierarchies, how does it really work ?"
- Previous message: Janaka: "Re: Accessing functions defined in Global.asax"
- In reply to: Anjali Lourda: "Accessing functions defined in Global.asax"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 04 Feb 2004 08:50:05 -0600
Anjali Lourda wrote:
> Hi,
> I have defined a function in global.asax file. Could somebody please
> tell me how i am supposed to call that function from the other files
> of the same project.
> Global.asax
> public function getName() as String
> dim name as string
> name = "Abc"
> return name
> end function
>
>
> myfile01.aspx
> 'How do I call that function from this file. Am I supposed to import
> something?
You could call a function defined in global.asax but you would be *much*
better off creating a class with a static method and referencing the
method that way. This is the purpose of code-behind.
-- Ryan Walberg, B.Sc., MCSD, MCSD for .NET generalpf@nospam.yahoo.com.nospam
- Next message: Ryan Walberg: "Re: Eventhandling in Page hierarchies, how does it really work ?"
- Previous message: Janaka: "Re: Accessing functions defined in Global.asax"
- In reply to: Anjali Lourda: "Accessing functions defined in Global.asax"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|