You just have to wrap the code in `Page_Load` in a `!Page.IsPostBack`-check:
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
// code here that should be executed only at the first time
// and not on consecutive postbacks
}
}
As suggested, you can also try `AppendDataBoundItems`