UI Classes
-
Hello Everyone I understand the concept of using Business Classes. But what about UI Classes? A possible scenario can be a web design that needs to be used over and over, in all web pages, can we design a UI Class through which all the other pages will Inherit and re-use that effort? Or is there another concept for that? If there is, is it to use Custom Controls? Thanks a lot. Best Regards...
-
Hello Everyone I understand the concept of using Business Classes. But what about UI Classes? A possible scenario can be a web design that needs to be used over and over, in all web pages, can we design a UI Class through which all the other pages will Inherit and re-use that effort? Or is there another concept for that? If there is, is it to use Custom Controls? Thanks a lot. Best Regards...
You can do both. For a project I worked on earlier this year, I created my own user control class (inheriting
UserControl
) and page class (inheritingPage
) to add base code that work with our web framework. So when I created a new user control under the VS.NET, I set the class defined under the .ascx.(vb|cs) to inherit from my user control class. Using this design, I was able to add core functionally by changing the base class and just re deploying one assembly. ~Javier Lozano -
You can do both. For a project I worked on earlier this year, I created my own user control class (inheriting
UserControl
) and page class (inheritingPage
) to add base code that work with our web framework. So when I created a new user control under the VS.NET, I set the class defined under the .ascx.(vb|cs) to inherit from my user control class. Using this design, I was able to add core functionally by changing the base class and just re deploying one assembly. ~Javier LozanoSounds Interesting. Could you please be so kind to give some code or a simple web page example. Lets say I need a User Control Class that will have a Header. So when I Inherit other pages from this class, the Header would come along. I would really appreciate as much help I can get from you. Thanks. Best Regards...