I have created a visual web part containing the default user control. I want to access the custom property of the web part defined in the xml-file Mywebpart.webpart -CustomProperty- from the code-behind of the user control, but don´t know how.
<?xml version="1.0" encoding="utf-8"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="foo" />
<importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">mywebpart</property>
<property name="Description" type="string">a nice visual web part</property>
<property name="CustomProperty" type="string">foo foo</property>
</properties>
</data>
Up to now, I can only access Title and Description:
Mywebpart parent = (Mywebpart)Parent;
string title = parent.Title;