Best Practice of making a Composite Control with a repeater activity
It's Templated-Based, have paging support via a DropDown and 2 Buttons It should have Event-Handling also Needed to work as a package for ( so didn't want to give template-editability or much programming options )
Key Parts to answer :
- A Custom Repeater, A Composite Control , A Custom Control with
functionality similar to repeater or
CompositeDataControl
? How prepare and get the data to avoid repetition of the processes I did all controls creation and initiation in
CreateChildControls
but seems that it is running in every request, Is it good to let all the controls created on every Postback or We have to Control this process, How do you suggestCause we want to Bind via the repeater should we do anything regarding of Data Binding inside the Composite Control ? In my example I binded the repeater (just the repeater) in a method that will run in each run in every serious event like
OnLoad
(Conceptually we binded the repeater, not the CC)How to make a property such as Page Number persistent via postbacks use
viewStates
or if any click we pass the new Page info from session to the control it should do the job ? What is your Paging Strategy, In simple LinesShould I store anything of the Repeater in ViewState/Control State and assign a property for them ?
want to know your decision, best-practice other professionals know and suggest