\"Custom Properti" />
开发者

Can I use files as custom SharePoint WebPart property?

开发者 https://www.devze.com 2023-02-14 10:17 出处:网络
Is it possible to use a file as custom SharePoint Webpart property?开发者_高级运维 I would like to provide a file upload box in the WebPart editing menu. (\"Modify This Web Part\" -> \"Custom Properti

Is it possible to use a file as custom SharePoint Webpart property?开发者_高级运维 I would like to provide a file upload box in the WebPart editing menu. ("Modify This Web Part" -> "Custom Properties").

According to the documentation (MSDN - Creating a Web Part with Custom Properties) by default only bool, int, string, enum and datetime types are supported.

Is there any way to allow the user to upload a file instead?


You could create a custom EditorPart (or Toolpart) that allows the user to upload a file. I like Bil Simser's blog because he helps mimic out of the box SharePoint styles: http://weblogs.asp.net/bsimser/archive/2009/08/12/spreading-some-sharepoint-love-to-editorpart.aspx

Here is another answer of someone who also needed a Toolpart and the example on MSDN.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号