【发布时间】:2012-09-01 13:04:35
【问题描述】:
我正在尝试解决 Visual Studio 中的一个错误,the suggestion is to stop using UserControls and use Control instead.。
所以我将我所有的 UserControl 转换为 Control,例如:
public partial class Controls_UserManagement_GroupManager : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
变成
public partial class Controls_UserManagement_GroupManager : System.Web.UI.Control
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
除了没有Control.IsPostBack吗?
如何将UserControl 替换为Control?
系列
这个问题是 Stackoverflow 系列中的一个,“模板化用户控件”:
【问题讨论】:
标签: asp.net user-controls