Performance with ASP.NET AJAX (hockblogs.net)

submitted by hockmanhockman(505) 3 years, 5 months ago

Hi there, In my series of 'Performance with ASP.NET AJAX & Client Repeater Control', which I started about three weeks ago, now it is already time for part 4 of the series, namely: Performance with ASP.NET AJAX & Client Repeater Control - Part 4 - String Concatenation. These are the articles that I have already written about: * Performance with ASP.NET AJAX & Repeater Server Control - Part 1 - The Updatepanel * Performance with ASP.NET AJAX & Client Repeater Control - Part 2 - Using StringBuilder * Performance with ASP.NET AJAX & Client Repeater Control - Part 3 - DOM Create element * Performance with ASP.NET AJAX & Client Repeater Control - Part 4 - String Concatenation Things in this solution are a little bit different compared to the Server side Repeater control and updatepanel approach. The overall aspect is exact the same as written in part 2 of the series, except for the client-side code to built the results table. These are the things I have done (which can be seen when you download the source files below): 1. Setting up a page with a generate data button to retrieve a set of 3000 person records 2. Setting up a local webservice that will get the data (could have been a PageMethod). 3. Invoking the webservice from client script 4. Cathing the results and build a client repeater using the old fashioned string concatenation stuff. So this is how my page looks when invoking the Generate button for the first time: When invoking the 'Generate data button', a client side script is invoked, that on its turn will call the local webservice, which was referenced as a script resource in the scriptmanager. The local webservice is called that returns the 3000 person records (I wanted a large resultset, so you could see that the performance issues arise when using an updatepanel as in my previous post). When the data was retrieved from the local webservice it is handled in client script by making use of string concatenation. This is the call to the local webservice: PersonService.GeneratePersons(onSuccess, onFailed); This is the javascript used to make up the table: function BuildTable(results) { var table = '<table><tbody>'; var header = '<tr>'; header += "<td width='100px' valign='top' align='left'>Id</td>"; header += "<td width='100px' valign='top' align='left'>Name</td>"; header += "<td width='100px' valign='top'

add a comment |category: |Views: 22

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story