I've created a new umbraco dashboard item on the content node to display a list of new comments on an MVC blog I'm making, it lists the comments as expected and the buttons to approve comments works flawlessly; however the page doesn't reload the list of comments and I'm not sure why.
After a postback, the same items display, however if I refresh, the new updated list displays, I need the updated list to display on postback rather than forcing the user to refresh the page.
Below is my onload method which loads the list of comments.
protected override void OnLoad(EventArgs e) { base.OnLoad(e);
// check if it's a postback because showing new results on postback breaks the
// ability to get checkbox values if (!IsPostBack) { showResults(e); } }
I'd appreciate any help on this matter and thanks in advance, Luke.
Custom Dashboard Item
I've created a new umbraco dashboard item on the content node to display a list of new comments on an MVC blog I'm making, it lists the comments as expected and the buttons to approve comments works flawlessly; however the page doesn't reload the list of comments and I'm not sure why.
After a postback, the same items display, however if I refresh, the new updated list displays, I need the updated list to display on postback rather than forcing the user to refresh the page.
Below is my onload method which loads the list of comments.
I'd appreciate any help on this matter and thanks in advance,
Luke.
Isn't it just to remove the !IsPostBack check?
( showResults(e) is only executed on when the page/control is first loaded as it is now )
-tk
is working on a reply...