How to save value in the dialog to the WebPart property
-
2012年3月2日 6:40
In the control panel of a WebPart,I click a button,then it popups abdialog,and I write something in the dialog,click the save button in the dialog,then what I've writed will be saved to the WebPart.
I can popup the dialog,but I don't know how to save the contents in the dialog,will you give me some advice?Thanks!
全部回复
-
2012年3月6日 21:48
Hi Xiaodan Mao,
Perhaps you can review the information in the link below to see how to create webpart properties.
http://blog.concurrency.com/sharepoint/create-a-custom-web-part-for-sharepoint-2010/
Cheers,
Jeff-MSFT
- 已标记为答案 Daniel YangMicrosoft Contingent Staff, Moderator 2012年3月12日 2:20
-
2012年3月7日 10:52
hello
in order to communicate with web part you need to create your dialog using custom EditorPart (base class for controls used for custom web part properties). Having custom EditorPart in codebehind you may use its EditorPart.WebPartToEdit property which contains reference to the parent web part which properties you want to modify.
Blog - http://sadomovalex.blogspot.com
CAML via C# - http://camlex.codeplex.com- 已标记为答案 Daniel YangMicrosoft Contingent Staff, Moderator 2012年3月12日 2:21

