A
Alan Pretre
I have a a WebForms.Table control that I am populating in Page_Load(). One
of the columns has cells with a button in each row, which I wire up to its
Click event handler. Everything is fine if I don't condition the table fill
on IsPostBack. But if I use IsPostBack, like so:
Page_Load()
{
if (!IsPostBack)
{
fill the table, including creating the buttons
}
// Then wire up the buttons
foreach (row in the table)
{
attach the click event handler
}
}
then the table is empty.
The table fill is costly and I'd only like to fill it once. Can you help me
with this. I do have EnableViewState=true on the table control.
-- Alan
of the columns has cells with a button in each row, which I wire up to its
Click event handler. Everything is fine if I don't condition the table fill
on IsPostBack. But if I use IsPostBack, like so:
Page_Load()
{
if (!IsPostBack)
{
fill the table, including creating the buttons
}
// Then wire up the buttons
foreach (row in the table)
{
attach the click event handler
}
}
then the table is empty.
The table fill is costly and I'd only like to fill it once. Can you help me
with this. I do have EnableViewState=true on the table control.
-- Alan