如何以编程方式更改sharepoint webpart属性

编程入门 行业动态 更新时间:2024-10-09 07:21:51
本文介绍了如何以编程方式更改sharepoint webpart属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在页面上放置了自定义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属性

本文发布于:2023-11-09 07:54:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571791.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   方式   sharepoint   webpart

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!