FindControl()
工作快不快?
如果我多次搜索和使用相同的控件,我是否需要使用这样的属性来缓存结果?
private MyUserControl c;
private MyUserControl MyC
{
get
{
if(c == null)
c = (MyUserControl)FindControl("c");
return c;
}
}
FindControl()
工作快不快?
如果我多次搜索和使用相同的控件,我是否需要使用这样的属性来缓存结果?
private MyUserControl c;
private MyUserControl MyC
{
get
{
if(c == null)
c = (MyUserControl)FindControl("c");
return c;
}
}