am trying to add "Classic ASP, Basic Serialized XML example" in asp.net C# but it is not working. and making very much complex. It is easy to implement in PHP but difficult to add on asp.net C#.
this the sample code i am using to add subscription on the list.
if anyone have some idea? Thanks in advance.
Prabir
this the sample code i am using to add subscription on the list.
Code:
// not the real ids
string apikey = "81aa72cc56e2438egd87601997509760-us1";
string listId = "k264gc0ac1";
string resp;
string MCQuery = "http://api.mailchimp.com/1.2/?method=listsubscribe&output=xml&apikey=" + apikey;
MCQuery = MCQuery + "&id=" + listId;
MCQuery = MCQuery + "&email=" + collection["email"];
MCQuery = MCQuery + "&email=" + collection["first-name"];
MCQuery = MCQuery + "&merge_vars=";
//object xmlhttp = new object();
//var myReq = new XMLHttpRequest();
object xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP");
xmlhttp.open("GET", MCQuery, false);
xmlhttp.send();
Prabir