C#: Create the list and fill it with contacts


C#: Create the list and fill it with contacts

I would like to export my mail-list to ConstantContacts so I’m trying to create the new list and fill it with my contacts.

Using ConstantContactsUtility.Utility for an ASP Upload Form sample I do the following:


ContactList firstList = new ContactList( nextListId, nextListName );

ContactList secondList = Utility.CreateNewContactList( authenticationData, firstList );

// At this point secondList.Id and secondList.Name are nulls.

// But I can see the added ContactList at the end of currentContactLists at the next step

IList<ContactList> currentContactLists = Utility.GetUserContactListCollection(authenticationData, out nextChunkId);

// After getting new ContactList from this collection I can fill it with contacts.


Is there any way to get newly created ContactList without using GetUserContactListCollection()?




It looks as though you may have modified some of the code from the sample pack. In order to help you with your request,  please send us your ContactList class, as well as what you have implemented for your CreateNewContactList method in the Utility class. You can either reply to this post with your code or send an email to our webservices support team containign your code, and we will be happy to take a look. If you have any questions regarding this please let us know. Thanks.

David J

Developer Portal

View API documentation, code samples, get your API key.

Visit Page