在查找控件时遇到了问题,但是当存在该控件时它返回null。
它被调用于一个asp:button click
(没有任何字段显示动态)。这些控件是标签,并且具有运行服务器等。我正在使用Umbraco,考虑到使用Page.FindControl
在Umbraco中可能无法工作,因为它使用主页面?以下是代码:
<asp:Label ID="Reg_Name_Error" CssClass="error" runat="server" />
if (Page.FindControl("Reg_Name_Error") != null) { }