Thanks for that. I have created the function in Global.asax file in the
site root as follows;
script language="VB" runat="Server">
Shared Function MyFunction(ByVal d As Object, ByVal pat As Object) As Object
End Function
</script>
However when I use it in one of my pages as below;
MyVar = Global.MyFunction(Now, "dd/mm/yyyy hh:mm:ss")
I get an '"MyFunction is not a member of '<default>' error. What am I doing
wrong?
Thanks
Regards
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:3B**********************************@microsof t.com...
For simplicity's sake, you can create public static ("Shared" in vb.net)
methods in the Global.asax class. Then any page can access these methods
with:
Global.MethodName(parameterValue...)
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"John" wrote:
>Hi
Is there a way to declare public functions that can be accessed in any
aspx
page? Can global variables be declared?
Thanks
Regards