J
John
Hi -
I've got a couple of pages where a DataList is populated only if(!Postback).
I have buttons in the datagrid that allow for the 'deletion' of items from
that DataList.
The problem is that the deleted items don't disappear on Postback, but only
after a page refresh. I assume this is because the DataList is not
redatabound unless !Postback. However, if I remove the if(!Postback)
statement, the button's 'delete' method doesn't seem to work at all.
How can I fix this? Do I need to disable viewstate on some things, or do
something like move my PopulateDataList() method from Page_Load to
Pre_Render? Thus far I've been forcing a page refresh after the 'delete'
method is run, by doing Response.Redirect(Request.RawUrl), and that works,
but it doesn't seem efficient.
Thanks in advance!
-John
I've got a couple of pages where a DataList is populated only if(!Postback).
I have buttons in the datagrid that allow for the 'deletion' of items from
that DataList.
The problem is that the deleted items don't disappear on Postback, but only
after a page refresh. I assume this is because the DataList is not
redatabound unless !Postback. However, if I remove the if(!Postback)
statement, the button's 'delete' method doesn't seem to work at all.
How can I fix this? Do I need to disable viewstate on some things, or do
something like move my PopulateDataList() method from Page_Load to
Pre_Render? Thus far I've been forcing a page refresh after the 'delete'
method is run, by doing Response.Redirect(Request.RawUrl), and that works,
but it doesn't seem efficient.
Thanks in advance!
-John