Board index » Web Programming » Global access of Enum

Global access of Enum

Web Programming218
Hi,

I have an Enum which I need to use in many pages and many classes written in

asp.net 2.0

I would like to have a central repository for the enum so that changes can

be made once. Also I would like a global access to it, meaning any page

should be able to access it. How can I achieve this ?


-
 

Re:Global access of Enum

What I would do is have it in a base page, then have all your pages inherit

from this page instead of the standard .Page object. This is a great idea for

sharing items among all pages in your site.



--

Curt Christianson

site: www.darkfalz.com">www.darkfalz.com

blog: blog.darkfalz.com">blog.darkfalz.com







"P K" wrote:



Quote
Hi,

I have an Enum which I need to use in many pages and many classes written in

asp.net 2.0

I would like to have a central repository for the enum so that changes can

be made once. Also I would like a global access to it, meaning any page

should be able to access it. How can I achieve this ?

-

Re:Global access of Enum

Hi,



just add a new file to the project ( a "class file" is ok ) and declare the

enum there. It will be accesible to all classes in your project





cheers,



--

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

Florida Department Of Transportation





"P K" <PK@discussions.microsoft.com>wrote in message

Quote
Hi,

I have an Enum which I need to use in many pages and many classes written

in

asp.net 2.0

I would like to have a central repository for the enum so that changes can

be made once. Also I would like a global access to it, meaning any page

should be able to access it. How can I achieve this ?





-