开发者

Subsonic retuns me a menucollection object how do i map it to asp.net menu control

MenuCollection muc = new MenuCollection(); muc.Load(SPs.UspGetUserM开发者_如何学JAVAenu(Context.User.Identity.Name).GetReader());

how do i map it to the menu control in Asp.net


If the menu control has a datasource property:

MenuCollection muc = new MenuCollection();
muc.Load(SPs.UspGetUserMenu(Context.User.Identity.Name).GetReader());
MyMenu.DataSource = muc;
MyMenu.DataBind();

EDIT: My idea was wrong. You can't just pass a subsonic collection to a menu datasource. This related question shows that you need to implement the IHierarchyData interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜