Hello all
I have an asp.net application written in vb that has a shared class. The reason for this is so it can grab a table object from the database.
There are a few other functions and variables in there too but nothing serious.
they are shared so I didn't have to create the class and destroy it every place I wanted to use the function.
I'm thinking this was a bad move, but it's been a while since this was written.
I was looking at inheriting a default page where I could instantiate a class in the page's PreInit sub.
That would give me access to the class without having it shared.
Is it worth the effort to recode it this way? Sorry, I'm a bit new to the web side.
Thanks
I have an asp.net application written in vb that has a shared class. The reason for this is so it can grab a table object from the database.
There are a few other functions and variables in there too but nothing serious.
they are shared so I didn't have to create the class and destroy it every place I wanted to use the function.
I'm thinking this was a bad move, but it's been a while since this was written.
I was looking at inheriting a default page where I could instantiate a class in the page's PreInit sub.
That would give me access to the class without having it shared.
Is it worth the effort to recode it this way? Sorry, I'm a bit new to the web side.
Thanks