PDA

View Full Version : Refreshing the DataList


gretzky56
07-28-2008, 01:58 AM
So this is my problem. I am creating a sort of a commenting section. I use a DataList to show all the entries in the database, and I use a FormView below the DataList to add new entries. The formview is set for Insert only. Now whenever I add a new post the post isnt show in the DataList after that.
I have to first go to another page and when I come back I see the post.

So I was wondering how could I refresh the dataList whenever I press the add button in the FormView!?!

Thanks in advance.
:)

Nischumacher
08-12-2008, 01:03 PM
call the function that populates the datalist after all is done in add button...
when using Page.IsPostBack in the page load event, call that function after insert/update/delete...