How to save value in the dialog to the WebPart property
-
2 มีนาคม 2555 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!
ตอบทั้งหมด
-
6 มีนาคม 2555 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, Moderator 12 มีนาคม 2555 2:20
-
7 มีนาคม 2555 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, Moderator 12 มีนาคม 2555 2:21