Custom controls and built in templates
I tried to add a RadMenu into an ascx and drop it onto a built-in layout template via the toolbox (obviously after registering it)
But it complains about the lack of ScriptManager...now I can get it to work by putting a script manager in the ascx (renders in preview), but then in edit mode it says I can only have one on the page at a time so i'm not getting any preview rendered.
Ivan mentioned in another post that the scriptmanager should be auto-generated on the built-in templates?
Steve
Hello Steve,
You can check for the ScriptManager in the code behind of your control, so it will not be added twice. I noticed some issues with this and we have task to instigate the issue.
if
(ScriptManager.GetCurrent(page) ==
null
)
page.Form.Controls.Add(
new
ScriptManager());