Web Server Control Containing another Web Server Control?

I'm building a web server control that needs to include functionality from 3rd party web server control, ASPNetMenu.  My web server control needs to render ASPNetMenu at runtime to create a menu.  I'd like to do this so that my control's parent ASPX page does not need to register ASPNetMenu or make any configuration changes as this should be done through my web server control.  

Does anybody have any suggestions on how to do this?
Mike
- Cache entire web sites at the client and server and keep cache current. Cache just got easier!
0
mlibby
5/17/2004 9:20:02 PM
📁 asp.net.hosting-open-forum
📃 4216 articles.
⭐ 0 followers.

💬 2 Replies
👁️‍🗨️ 1872 Views

There are two articles that you would want to be interested in:

http://aspalliance.com/350
http://aspalliance.com/359
-- Justin Lovell
0
master4eva
5/18/2004 4:56:03 PM
Awesome headway!!! Still need some help though. 

The following code snippets shows how to configure and display ASPNetMenu via another web server control:
=============
// Note the parent aspx page still needs to set the .css file.
using CYBERAKT.WebControls.Navigation;
public class MyMenuTest : WebControl
{
protected CYBERAKT.WebControls.Navigation.ASPnetMenu _menu;
protected override void CreateChildControls()
{
Controls.Clear();
_menu = new CYBERAKT.WebControls.Navigation.ASPnetMenu();
_menu.ID = "m_" + this.ID;
_menu.TopGroup.Items.Clear();
_menu.MenuStyle = CYBERAKT.WebControls.Navigation.ASPnetMenuStyle.ClassicVertical;
_menu.MenuData = "Menu.xml";
_menu.EnableViewState = false;
_menu.ExpandDelay = 300;
_menu.ShadowEnabled = true;
this.Controls.Add(_menu);
}
protected override void RenderContents(HtmlTextWriter writer)
{
_menu.RenderControl(writer);
}
}
==================
The problem is that child menus are offset too far from the parent menu. They are about as far over horizontally and down vertically as MyMenuTest is from its containing web page borders.
Please let me know if anyone has any ideas,
Mike

- Cache entire web sites at the client and server and keep cache current. Cache just got easier!
0
mlibby
5/18/2004 10:30:35 PM