K
Kevin Blount
I have several pages that will contain forms used for registering with
our website. These form won't always show the same information, as
their primary purposes are different, but part of the processing will
be the registration.
I'd like to have just one method for the entire site that handles the
creation of new account, referenced by all these forms.
So, assuming that form 'a' contains 8 fields required for registration,
form 'b' contains the min of 4, form 'c' contains 7 and form 'd' has
all 11, how would you create the method and then use it?
I'm new to C#, so bear with me. I've heard of overloading, but I think
I'd basically need 4 copies of the same method, which seems somewhat
over the top. I wondered about putting the form fields into an object
of some kind and then passing that object to the registration method.
Would that work?
What do you think would be the best way to get varying ammount of data
into a single method? Any examples and/or tutorial sites would be
greatly appreciated.
Thanks
Kevin
our website. These form won't always show the same information, as
their primary purposes are different, but part of the processing will
be the registration.
I'd like to have just one method for the entire site that handles the
creation of new account, referenced by all these forms.
So, assuming that form 'a' contains 8 fields required for registration,
form 'b' contains the min of 4, form 'c' contains 7 and form 'd' has
all 11, how would you create the method and then use it?
I'm new to C#, so bear with me. I've heard of overloading, but I think
I'd basically need 4 copies of the same method, which seems somewhat
over the top. I wondered about putting the form fields into an object
of some kind and then passing that object to the registration method.
Would that work?
What do you think would be the best way to get varying ammount of data
into a single method? Any examples and/or tutorial sites would be
greatly appreciated.
Thanks
Kevin