Hi All:
Please ignore the previous message, I was just testing to see if I was registered or not.
This question is for anyone who may have good experience with creating web custom controls, and heavy use of inheritance, and object oriented programming. Everything I have done in VS.NET has been self taught, so I was hoping someone who has already been through this type of programming may help me avoid future complications.
My solution consists of 3 projects: a 'custom control' project, a 'data classes' project, and, of course a web application in which to implement them.
For example, in the 'custom controls' project, I have a simple custom form that does a search for a user from a database of our computer users. It only contains the basics, e.g. user first name, user last name, department. From that I create another control, a detailed user view form, that inherits all the controls from the previous form, adding new controls for additional user details, e.g. phone, pager, office, etc.
The 'user search' form uses a class from the 'data classes' project, and constructs a user object, does a search, and reloads the user object with more detailed data.
My concern, is about access protection levels. I realize that using "protected internal" is necessary to access base form controls from controls that inherit from them. But as for the data classes that are used in the base controls, I have also been using "protected internal" and updating the objects when necessary in the child classes, rather than declaring them individually as 'private' in every new child class.
This procedure is not causing me any problems at the present, but I'm not sure if this is the 'safe' way to go about accessing the data class object, and whether it will cause me complications in the future. Should I always declare them as 'private' and pass values through SessionState? Or is my current method acceptable?
Thanks in advance for any feedback.
|