protected void btnLoad_Click(object sender, EventArgs e) { try { api = new D3API(HostName.en_GB); dynamic careerProfile = api.getCareerProfile(txtbBattletag.Text); foreach (Dictionary <string, dynamic> hero in careerProfile.heroes) { foreach (var pair in hero) { if (pair.Key == "id") { dynamic heroProfile = api.getHeroProfile(careerProfile.battleTag, pair.Value); Document heroDocument = d3pServices.CreateDiablo3Hero(new Document(2354), heroProfile, User.GetUser(0)); } } } }catch (Exception errorEvent) { string error = errorEvent.ToString(); lblTestMethods.Text = error; } }