AD object properties update (set to nothing)

G

Guest

Hi
How can we set a property of an AD object to null / nothing / ""

ie. to remove the existing value from the object's property, I have tried
using

String txt1;
entry.Properties["Street"].Value = txt1;

if txt1 is "", an error such as invalid attribute syntax will be thrown.

Any idea to do it?

TIA
--
 
J

Joe Kaplan \(MVP - ADSI\)

It is just the way it works under the hood with LDAP. You can also use the
Clear method which is pretty straightforward.

Joe K.

I just got it, simply set it to null !? why can't it be ""?

Hi
How can we set a property of an AD object to null / nothing / ""

ie. to remove the existing value from the object's property, I have tried
using

String txt1;
entry.Properties["Street"].Value = txt1;

if txt1 is "", an error such as invalid attribute syntax will be thrown.

Any idea to do it?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top