I have a webpart where I access a sharepoint list and render contents of that list.
At the moment I'm fetching the data in CreateChildControls().
When a button is clicked the data will be fetched again (filtered by text in a form input field). This happens in the HandleClickEvents() method.
Because of the lifecycle, CreateChildControls() will always be called before HandleClickEvents(), so the data will be fetched twice.
Is there a way to avoid that or respectively, where is the right place to fetch the data?