0
votes

Question:

Is it possible to execute code solely upon the editing/settings change of a web part (presumably via event listeners) and if so can someone link/provide an example?

Background:

I'm developing web parts for Sharepoint (specifically 2007 in this instance).
Latest one includes a feature to specify the urls of pages and display their contents.
This is working fine.
A further requirement is that if a page is specified/handled by the web part then it should be hidden from the normal navigation bar.
I have the code to do this but there is no way in hell that I want this called every time a user views the web part (i.e. not in the constructor, create child components or (pre)render), rather I want it done only when the settings are changed.
I can find no information on/examples of this.

1

1 Answers

0
votes

if you are developing your custom webpart then it may be possible to provide this functionality in the Custom tool part

WHen a user changes any properties for the Web part or the custom properties of a web part then it will call the Apply changes and Sync Changes events.

So in the apply changes event you can provide your logic and check for the change in the url .. and then hide it as per your requirement,

Sorry right now i dont have any code to show.