无法在业务层中找到页面面板 [英] unable to find panel of page in business layer

查看:70
本文介绍了无法在业务层中找到页面面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我无法在业务层的页面''头部中找到面板.
以下是我的代码:

Hi ,
im unabel to find panel in page''head section in business layer.
following is my code :

public void SetPageDetails(Page pg)
        {
            PlaceHolder meta = pg.FindControl("MetaPlaceHolder") as PlaceHolder;
         }






我将meta设为null;






im getting meta as null;

推荐答案

如果您从
获取null
If you get null from
pg.FindControl("MetaPlaceHolder") as PlaceHolder

,那么FindControl不会找到任何名为"MetaPlaceHolder"的控件,或者找到的控件不是PlaceHolder或从PlaceHolder派生.

您需要拆分该语句,然后通过调试找出该语句...

Then either FindControl does not locate any control called "MetaPlaceHolder", or the control it does find is not a PlaceHolder, or derived from a PlaceHolder.

You need to split the statement, and find out which by debugging...


这篇关于无法在业务层中找到页面面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆