我在页面上放置了自定义sharepoint webpart ...
I have placed custom sharepoint webpart on page...
我想以编程方式更改webparts属性(高度,宽度)....
I want to change webparts property(height,width) programatically....
所以来自其他一些sharepoint页面我调用webpart存在的页面我可以看到带有属性的webaprt我设置..
so when from some other sharepoint page I call page where webpart is present I could see webaprt with properties I set..
我们可以实现这个吗?
任何链接都有用。 ...
any links would be useful....
-Shwetank
-Shwetank
推荐答案
你好Shwetank,
Hello Shwetank,
在您的webpart中,您可以访问CreateChildControls方法中的标题,宽度,高度属性等所有属性。
In your webpart you can access all the properties like Title, Width, Height properties in the CreateChildControls method.
您可以检查默认值WebPart的属性 here
You can check the default properties of WebPart here
ex; this.Title ="我的自定义WebPart";
ex; this.Title = "My Custom WebPart";
如果你想创建自定义webpart属性,请查看 wictor wilen 的博客
If you want to create custom webpart properties, check wictor wilen's blog
更多推荐
如何以编程方式更改sharepoint webpart属性
发布评论