We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Returning 200,000 contacts Causes Page to load forever

jtwoods4
Participant

Returning 200,000 contacts Causes Page to load forever

I have implemented the example API code to pull a list of our contacts into a C# .NET Gridview. It has worked 1 time but now everytime I click the button on my page "Show Constant Contact Users", the page authenticates and then shows the Internet Exploere page loading status bar and it just loads forever. Anyone know what the problem may be. We have 200,000 plus users in the database. howveer, I am using the exmaple C# code from the contstant contacts exmaple code. So I know the code is correct.


This appears to be where the code never returns a result:


 



 


void GetContactCollection()try string nextChunk;string.IsNullOrEmpty(CurrentChunk)Utility.GetContactCollection(AuthenticationData, out nextChunk)Utility.GetContactCollection(AuthenticationData, CurrentChunk, out nextChunk);// update chunk links

UpdateChunkLinks();


GridView1.DataSource = List;


GridView1.DataBind();


}


 


{


catch (ConstantException ce)

#region


 


stringBuilder.Append(


stringBuilder.AppendFormat(


stringBuilder.Append(


ClientScript.RegisterStartupScript(


display alert messageStringBuilder stringBuilder = new StringBuilder();@"<script language='javascript'>");@"alert('{0}')", ce.Message);@"</script>");typeof (Page), "AlertMessage", stringBuilder.ToString());

#endregion



}


}



 


{


 



{


 


List =


?


:


NextChunk = nextChunk;


 



private

1 REPLY 1
atran88
Regular Participant

Hello,


 


Are you currently attempting to retrieve all contacts in one session? Or are you simply trying to retrieve a chunk of 50 and the link to the next set of contacts?

Andrew T

Support Engineer, Constant Contact

Developer Portal

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

Visit Page