ShurikEv:
Вот же ж блин
Могли бы скинуть рабочий проект на shurik_ev @ mail.ru? А то вообще понять не могу почему у Вас получилось
Вот как-то так:
public class AutoCompleteLookupFieldControl : BaseFieldControl
{
protected override void CreateChildControls()
{
base.CreateChildControls();
if (!FindScriptManager(Page.Controls))
{
Controls.Add(new ScriptManager());
}
}
private bool FindScriptManager(ControlCollection controls)
{
foreach (Control item in controls)
{
if (item is ScriptManager)
{
return true;
}
if (FindScriptManager(item.Controls))
{
return true;
}
}
return false;
}
}
З.Ы. над поиском ScriptManager не смеяться)
Данное сообщение получено с сайта GotDotNet.RU
|