programmatically remove custom property definitions
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
programmatically remove custom property definitions

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
Nikolaj
Guest





Posted: Tue Jan 04, 2005 6:45 pm    Post subject: programmatically remove custom property definitions Reply with quote

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.
Back to top
Mei Ying [MVP]
Guest





Posted: Tue Jan 04, 2005 8:19 pm    Post subject: Re: programmatically remove custom property definitions Reply with quote

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...
Quote:
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.
Back to top
Stefan [MSFT]
Guest





Posted: Tue Jan 04, 2005 8:20 pm    Post subject: Re: programmatically remove custom property definitions Reply with quote

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...
Quote:
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.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB