So I'm using ASP.NET with C#. And I have an item that is queried from the database and displays items correctly.
I made a comment table, where user enters a piece of text, and presses an AJAX-enhanced button, to insert the comment into the database, which the table listview below displays.
However, when the user enters a comment, the table stays the same, it doesn't refresh. If I press Post a comment again, then it will display the previous comment, but not the current one.
I tried on the "post a comment" button to add the following:
CommentsView.DataBind();
No luck, it won't refresh. And some smart programmer at microsoft forgot to add a simple "ListView.Refresh()" function to ListView class.
I don't understand why AJAX doesn't automatically update the table to update the information. How do you get it to display the latest data?