2

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 :

  1. A Custom Repeater, A Composite Control , A Custom Control with functionality similar to repeater or CompositeDataControl?
  2. 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 suggest

  3. Cause 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)

  4. 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 Lines

  5. Should 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

1
  • This question belongs on StackOverflow Mar 21, 2012 at 16:58

1 Answer 1

1

Though this is not a comprehensive answer for your question. But if you disable view state, then event handling for components inside the repeater will stop working. I did write a blog post about it, and a workaround for that problem. http://petesdotnet.blogspot.com/2009/08/asp.html

1
  • Thanks Pete, I will look at it, maybe it points to a part of the question, and anyway it's appreciated
    – Kasrak
    Jun 2, 2012 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.