How (if at all) can you make an ASP.NET UserControl inherit from another UserControl?

前端 未结 3 1297
不思量自难忘°
不思量自难忘° 2021-01-11 13:41

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

3条回答
  •  心在旅途
    2021-01-11 13:54

    You could certainly inherit the base user control in code and insert your additional controls in code, if you are talking building in a visual designer then I'm not sure. I'm aware of creating composite controls from both system.web controls and user controls so there's no reason that your new control couldn't contain another user control with additional controls added around it.

提交回复
热议问题