In Windows Forms it's easy to inherit one user control from another. The inherited control contains all the controls of the parent form, and you can add some more. Can the same be done with ASP.NET? I'm talking about the .ASCX type of user controls.
User controls. User controls are containers into which you can put markup and Web server controls. You can then treat the user control as a unit and define properties and methods for it. Custom controls. A custom control is a class that you write that derives from Control or WebControl.
User Control properties are used to set the values of a User Control from the parent page.
The short answer is no it can't be easily done. There's no inheritance between user controls or webforms. You can create an inheritance hierarchy between the code behinds classes but the gui components aren't inherited.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With