My question is: how can I set the default value to a web part property in sharepoint so that is shows up in the tool pane?
And how do I save the changes to the property after the user has changed the default value? So far it is not working.
thank you.
They are defined by marking the property with the descent Value.
Have a look here
http://allaboutmoss.com/2010/04/05/webpart-development-part-4-creating-custom-web-part-properties/
the they are serialized to xml and stored where the Webart is implemented (a webpartpage i.E)
HAve a look with designer at a webpartpage and you´ll see