|
-
Jul 20th, 2004, 06:20 PM
#1
Thread Starter
New Member
User Defined Class???
My question is this. I am writing a web-based application and I will need a lot of validation functions (quite possibly more than 100 different functions). In some cases the same validation function will be needed on multiple pages. Is there a way for me to create a "User Defined Class" or set of global functions so that I only have to store the validation functions once and can call them at any time instead of having to put the validation function within each page? The reason for wanting to do this is for maintenance and storage purposes. I want to be able to change the function once for all pages.
Any thoughts and ideas on how to accomplish this using Visual Studio .NET would be great.
Thanks!
-Kim
-
Jul 20th, 2004, 07:05 PM
#2
Addicted Member
I am not an ASP.Net developer. But I do this sort of thing in my windows applications via a module. Can't see how it would work any different in ASP.Net
-
Jul 20th, 2004, 07:09 PM
#3
Sleep mode
Apparently , you don't know the concept of OOP , do you ?
-
Jul 20th, 2004, 07:39 PM
#4
Thread Starter
New Member
Re-word...
Actually I do understand OOP (all my oop schooling was using C++ and even though the concept isn't different the environment is)...and say in Microsoft Access I would know exactly where to create a module to do exactly what I asked.
My problem is that I don't know Visual Studio .Net well enough yet to know where within Visual Studio .Net to do this. Since I am just getting started on the application (the first one I have written using VS.NET) I want to do it right the first time which means I need some sort of a user defined class or place to put global functions. The question is where within the application using VS.NET does it get put?
Thanks,
-Kim
-
Jul 20th, 2004, 07:43 PM
#5
Frenzied Member
One way to add a class is to right click on your project, click add, then click add new item - you see a dialog box of all the things you can add.
-
Jul 20th, 2004, 07:45 PM
#6
Sleep mode
If you do understand it then why don't you create these functions in a class files with base/inherited classes . You might like to mark these common functions with shared so you can call them from anywhere and without instantiating the class .
Project Menu , Add Class menuitem . Then start coding .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|