判断webpart类型 How can I tell what type a web part is?
2013-08-09 09:49
295 查看
using(new SPSite("
http://mysite/myweb").OpenWeb()) {
//give relative path of the webpartpage
SPLimitedWebPartManager wm = page.GetLimitedWebPartManager("default.aspx",
System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
foreach (System.Web.UI.WebControls.WebParts.WebPart wp in wm.WebParts)
{
}
}
if (wp.GetType().ToString() == "Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart")
额,那你属性所有webpart的特点,争取一眼看出来
You can add
http://sharepoint.stackexchange.com/questions/9683/how-can-i-tell-what-type-a-web-part-is
http://mysite/myweb").OpenWeb()) {
//give relative path of the webpartpage
SPLimitedWebPartManager wm = page.GetLimitedWebPartManager("default.aspx",
System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
foreach (System.Web.UI.WebControls.WebParts.WebPart wp in wm.WebParts)
{
}
}
if (wp.GetType().ToString() == "Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart")
额,那你属性所有webpart的特点,争取一眼看出来
You can add
?contents=1to the end of your page's URL to get a nice neat list of all the webparts that are currently opened and closed: http://sharepointsolutions.blogspot.com/2008/04/when-good-web-parts-go-bad.html
http://sharepoint.stackexchange.com/questions/9683/how-can-i-tell-what-type-a-web-part-is
相关文章推荐
- What is default gateway? How can we find it in Linux?
- Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it
- [ActionScript 3.0] 安全沙箱的类型sandboxType,判断当前程序是AIR还是web程序
- Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it
- What is overfitting and how can I avoid it?
- 为chart web part 提供的webpart 的接口类型。
- Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it
- 【转】Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it
- Flex的四种判断对象类型的方式 as instanceof is typeof比较
- python不使用type(obj) is **来判断变量的类型
- What is Web Application Architecture? How It Works, Trends, Best Practices and More
- Responsive Web Design: What It Is and How To Use It
- Flex进行数据类型判断:is typeof ObjectUtil.getClassInfo
- <boost -04>如何判断输入文件的类型在给定范围内?how to judge whether given file's extension is within list?
- jquery isType() 类型判断代码
- [转]How Can I Find Out What Is Using a Busy or Reserved Serial Port?
- jquery isType() 类型判断代码
- How to tell RNA-seq library type of strand-specific for RNA-seq data (for reads mapping by Tophat)
- httpwebresponse contentype类型值汇总
- Data type confusion: what is an int(11)?