cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

Simple C# GET example (contacts, lists, campaigns, etc.) using XDocument

Occasional Contributor

Simple C# GET example (contacts, lists, campaigns, etc.) using XDocument

Hello,

 

I was searching for a simple C# sample for a read-only (GET) application and came across (after the fact unfortunately) this post:

 

WebRequest / Webresponse Sample

 

which has all the bits I would have needed.   While I've used the design pattern in the above post before, I now try to use XDocument whenever I can as it requires far less scafolding.  There is still some set up of course, but to load a Xml document requires just one line:

 

XDocument Entries = XDocument.Load(XmlReader.Create(Url, XmlReaderSettings));

 

I've posted a very short yet fully functional excerpt of an ASP.NET application here:

 

XDocument Sample

 

Hopefully folks will find this useful.

 

Cheers-

 

1 REPLY 1
Highlighted
CTCT Employee

Re: Simple C# GET example (contacts, lists, campaigns, etc.) using XDocument

Hey Susan

 

Thank you for sharing your examples with us. 

Ryan Davis
Quality Engineer