Example of how to change an existing entry
myModification.Name = "SafeControl[@Assembly='MyCustomAssembly'][@Namespace='MyCustomNamespace'][@TypeName='*'][@Safe='False']"; myModification.Value = "<SafeControl Assembly='MyCustomAssembly' Namespace='MyCustomNamespace' TypeName='*' Safe='True' />";
This will change an entry matching Name with Safe='False' to Safe='True'. If you wanted a more relaxed filter to match regardless of the Safe value, simply remove that part of the Name.
myModification.Name = "SafeControl[@Assembly='MyCustomAssembly'][@Namespace='MyCustomNamespace'][@TypeName='*']";
Hi Lars,
ReplyDeleteThanks for this post. Yeah it helped me to modified one attribute. But with this, when i deactivate the feature it do not remove the modified item as the name format does not match with the now modified item.
Hi Sumeet,
ReplyDeleteDid you try relaxing the Name filter by removing the "[@Safe='False']" part or your modified value?