I've picked up a few things and I'm starting to find the code that I'm writing very repetitive. There are some parts that should really be global functions. I have no idea how to go about doing that. Can someone point me in the direction of a tutorial that
will give me the syntax? Many thanks David
If you use VB.Net, put them in a Module or Class and make it Public. If you use C#,put them in a Class make it Public. If you use class, you may make these functions "Shared"(vb.net) or "Static"(C#) for easy access.
This posting is provided "AS IS" with no warranties, and confers no rights.
I'm using VB.net Sorry I'm new to all this and was basically looking for an ABC tutorial to help me with the syntax of how one creates a shared class and how one references that in the code that makes use of it. I suppose this is really a VB.net syntax question
and not a WebMatrix question. Thank you
Hi. The trouble with following your advice is that it seems only to work with Visual Studio and not with Web Matrix. In Visual Studio I know that I can add a new .vb file to my project and thatr any public classes defined in that file will be accessible throughout
the rest of the project. However, in ASP.NET Web Matrix there is no vbproj file and so there is no way to add a separate .vb file. So the only way I can declare a class that accessible to several pages seems to be to paste the code which defines the class
into every aspx page that needs it. I hope this description of my problem is clear :-)
BraveDruid
Member
40 Points
8 Posts
code organisation
Sep 08, 2003 09:32 PM|LINK
BraveDruid
Member
40 Points
8 Posts
Re: code organisation
Sep 08, 2003 10:14 PM|LINK
JimmyM
Star
8796 Points
1671 Posts
Re: code organisation
Sep 08, 2003 10:23 PM|LINK
BraveDruid
Member
40 Points
8 Posts
Re: code organisation
Sep 08, 2003 10:42 PM|LINK
Plucky
Member
731 Points
158 Posts
Re: code organisation
Sep 08, 2003 11:25 PM|LINK
JimmyM
Star
8796 Points
1671 Posts
Re: code organisation
Sep 09, 2003 01:58 AM|LINK
BraveDruid
Member
40 Points
8 Posts
Re: code organisation
Sep 13, 2003 12:58 PM|LINK