在WebPart中使用以前用VS.NET开发的Web User Control(asmx)
可以,在webpart中使用this.Page.LoadControl(string),可以加载一个Web User Control。比如web user control的文件在C:\TryUserCtl.asmx,则使用this.Page.LoadControl(@"C:\TryUserCtl.asmx")就可以得到这个Control对象。一些用户控件包装器就是通过这个原理实现的。比较好的用户控件包装器推荐 博客堂的Kaneboy写的。具体见其Blog:SharePoint用户控件包装器(UserControl Wrapper Part)
浙公网安备 33010602011771号