G
Guest
Hi,
I have i fishy problem when I have e Repeater with user controls.
page_load
{
if (!isPostBack)
{
repeater.databind();
}
}
A placeholder holds the user controls
When I do postback my Repeater is empty. I don't want to rebind my computer
on evry posback. The data should be in the viewstate....?
ex.
linkbutton_OnCommand(object sender, CommandEventArgs e)
{
foreach (RepeaterItem e in repSurveyObject.Items)
{
PlaceHolder plh= (PlaceHolder)e.FindControl("plh");
// This is empty... strange. If i remove the lines on page_load
// it works....
}
}
Any nice solution for this problem?
I have i fishy problem when I have e Repeater with user controls.
page_load
{
if (!isPostBack)
{
repeater.databind();
}
}
A placeholder holds the user controls
When I do postback my Repeater is empty. I don't want to rebind my computer
on evry posback. The data should be in the viewstate....?
ex.
linkbutton_OnCommand(object sender, CommandEventArgs e)
{
foreach (RepeaterItem e in repSurveyObject.Items)
{
PlaceHolder plh= (PlaceHolder)e.FindControl("plh");
// This is empty... strange. If i remove the lines on page_load
// it works....
}
}
Any nice solution for this problem?