首页 新闻 会员 周边

Unity和webform的集成

0
悬赏园豆:80 [已解决问题] 解决于 2008-10-04 10:02

http://forum.entlib.com/Default.aspx?g=posts&m=101

我看了这篇文章,没问题,可我的想法是在

一个asp.net页面中应该最

ILogger xx{get;set}

这个对象应该是直接注入了,而不是使用

            IUnity UnityCtx = Context.ApplicationInstance as IUnity;
           
            // This should find the WebLogger when trying resolve the ILogger
            ILogger logger = UnityCtx.Container.Resolve<ILogger>();

这个在每个页面里都来一下啊?

有什么方法,请指点

lexus的主页 lexus | 初学一级 | 园豆:0
提问于:2008-09-29 08:56
< >
分享
最佳答案
0

去我的博客看吧,有一篇就是说Unity和WebForm集成的

http://www.cnblogs.com/GrayZhang/archive/2008/06/10/1216952.html

Gray Zhang | 专家六级 |园豆:17610 | 2008-09-29 11:24
其他回答(1)
0

XPage:Page{

ILogger xx{get;set}

}

然后你每个页都将继承Page改为Xpage

重典 | 园豆:2442 (老鸟四级) | 2008-09-29 09:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册