how to get key and value in CampaginTemplateContent()

Dec 27, 2010 at 8:40 AM
Edited Dec 27, 2010 at 8:41 AM

mc = new MCApi(key, true);

            MCDict<string> tempcontent = mc.CampaignTemplateContent(Request.QueryString["ID"]);

            string inner = "";
            string bg = "";

            inner += "<table width='1024px' style='margin:auto;'>";
            inner += "<tr><th>ID</th><th>Web ID</th></tr>";
            for (int i = 0; i < tempcontent.Count; i++)
            {
                inner += "<tr >";
                inner += "<td>" + tempcontent<?> + "</td>";
                inner += "<td>" + tempcontent<?> + "</td>";
                inner += "</tr>";
            }
            inner += "</table>";

 

tempcontent<?>, i can't get return data from CampaginTemplateContent()

 

Coordinator
Dec 27, 2010 at 9:29 AM
Edited Dec 27, 2010 at 9:33 AM

Template content is simple Dictionary<string, string>:

string header = tempcontent["header"];

string main = tempcontent["main"];

string footer = tempcontent["footer"]

Or

foreach (var kv in  tempcontent)
{
     inner += "<tr >";
     inner += "<td>" + kv.Key + "</td>";
     inner += "<td>" + kv.Value + "</td>";
     inner += "</tr>";
}