| Author |
programmatically remove custom property definitions
|
|
| Nikolaj 2005-01-04, 7:47 am |
| Thanks to this newsgroup I have discovered how to create custom property
definitions programatically.
template.CreateCustomPropertyDefinition();
Is it also possible to remove custom property definitions.
The idea is that the cp definitions of my template should always match a
collection of checkboxes and dropdownlists on my template file (aspx).
This way I design a user interface in visual studio and save values in
custom properties.
Thanks.
| |
| Mei Ying [MVP] 2005-01-04, 8:46 pm |
| You could do it by calling CustomerPropertyDefinition.Delete(). But I'd be
careful with that - once the custom property definition is deleted, there's
no easy way to get the custom property values back!
--
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:6C1E7593-80B7-4A79-8B1D-FFB80225C6DD@microsoft.com...
> Thanks to this newsgroup I have discovered how to create custom property
> definitions programatically.
> template.CreateCustomPropertyDefinition();
>
> Is it also possible to remove custom property definitions.
>
> The idea is that the cp definitions of my template should always match a
> collection of checkboxes and dropdownlists on my template file (aspx).
>
> This way I design a user interface in visual studio and save values in
> custom properties.
>
> Thanks.
| |
| Stefan [MSFT] 2005-01-04, 8:46 pm |
| Hi Nikolaj,
sure! Retrieve the CustomPropertyDefintion object you need to delete and
call it's Delete method.
Cheers,
Stefan.
"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:6C1E7593-80B7-4A79-8B1D-FFB80225C6DD@microsoft.com...
> Thanks to this newsgroup I have discovered how to create custom property
> definitions programatically.
> template.CreateCustomPropertyDefinition();
>
> Is it also possible to remove custom property definitions.
>
> The idea is that the cp definitions of my template should always match a
> collection of checkboxes and dropdownlists on my template file (aspx).
>
> This way I design a user interface in visual studio and save values in
> custom properties.
>
> Thanks.
|
|
|
|