Skip to content Skip to sidebar Skip to footer

Multiple Records Displayed Due To Code

Hello Im getting multiple records displayed and they arent descending in order correctly when I insert on button click. The text is added to the database and it is displayed but I

Solution 1:

Simply clear the placeholder control before the loop:

test1.Controls.Clear();
while (reader.Read())
{
   ...
}

Solution 2:

Call PopulateWallPosts(theUserId); On Page_Prerender rather than twice on Load and on Click.

PS Your code is vulnerable for both SQL injection and XSS. Do not trust to user's input :)

Post a Comment for "Multiple Records Displayed Due To Code"