I have an application built by someone else that is returning results from a socket call when the end user types in a little product info, and hits submit. The application returns the results, but it sometimes displays the results twice. For example, if
I click submit on the application to do a search for a product, it may come back with the correct one, two, or three records (as there could be results from 1-3 locations), or it may repeat all those results twice. (Ie.: if there were two records returned,
it might simply display the info from the two records, or it may display the results from the two records in the first two rows of the , and then repeat rows 1 & 2 in rows 3 & 4.) Continuing to click submit on that page will (it appears randomly) change the
resulting displayed data - cycling between one set of results and two.
I've included the bit of code I think is involved. I inherited this code, and am trying to make it work, but I'm new to this type of application and only intermediate at best in asp.net. Thank-you in advance to anyone who can shed some light!!
On review, I see that the data is being called once - but it looks like it is being duplicated by times once assigned to "records" - looking at this more now...
Blue Jays Ba...
Member
6 Points
4 Posts
ARRGH! Duplicating data display (sometimes)
Oct 11, 2011 06:40 PM|LINK
I have an application built by someone else that is returning results from a socket call when the end user types in a little product info, and hits submit. The application returns the results, but it sometimes displays the results twice. For example, if I click submit on the application to do a search for a product, it may come back with the correct one, two, or three records (as there could be results from 1-3 locations), or it may repeat all those results twice. (Ie.: if there were two records returned, it might simply display the info from the two records, or it may display the results from the two records in the first two rows of the , and then repeat rows 1 & 2 in rows 3 & 4.) Continuing to click submit on that page will (it appears randomly) change the resulting displayed data - cycling between one set of results and two.
<div style="display: block;" width="100%" id="premain0" class="pre-action-link">I've included the bit of code I think is involved. I inherited this code, and am trying to make it work, but I'm new to this type of application and only intermediate at best in asp.net. Thank-you in advance to anyone who can shed some light!!
I hope this is clear enough..
If I run this on localhost, their is no duplication of data, but on the site there is. Does that help to give people an idea of what may be going on?
vb
Andrew Morto...
Member
360 Points
60 Posts
Re: ARRGH! Duplicating data display (sometimes)
Oct 12, 2011 05:51 PM|LINK
I think you need to check what is in your array records, then perhaps examine how it was generated if there are actually duplicate records in that.
--
Andrew
Blue Jays Ba...
Member
6 Points
4 Posts
Re: ARRGH! Duplicating data display (sometimes)
Oct 13, 2011 12:57 PM|LINK
HI Andrew,
Thanks for looking at this. I've checked though, and the data is "coming in" the same way each time, but it gets mangled once it's in the application.
Blue Jays Ba...
Member
6 Points
4 Posts
Re: ARRGH! Duplicating data display (sometimes)
Oct 13, 2011 03:15 PM|LINK
On review, I see that the data is being called once - but it looks like it is being duplicated by times once assigned to "records" - looking at this more now...