Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7065483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:57:42+00:00 2026-05-28T04:57:42+00:00

Is it better to perform data access operations on the page and then populate

  • 0

Is it better to perform data access operations on the page and then populate the properties of each usercontrol with the retrieved data.

–OR–

Is it better if each UC calls the business layer and pulls its own data independently without having to depend on the page.

Existing Conditions:
1. Any information (Querystring, URL, etc) that the page would use for data access is also available to the individual UC’s
2. Both solutions utilize caching.

My coworker insists that the first option is better since Data access only happens once on the page.

The second option seems more logical to me since it will allow me to place the UC on another page without the need for any additional wiring on the page itself. The page and the UC are truly decoupled.

Please advise on why one would be better than the other.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:57:43+00:00Added an answer on May 28, 2026 at 4:57 am

    The first option is the better in most cases.

    A UserControl is not the controller but the page. It should display data not access it. The page normally sets the UserControl’s properties.

    One of it’s purpose is reusability. This will be decreased if it’s hardlinked with datasources. It should work with any kind of DAL, it shouldn’t bother with them at all.

    But if it’s only purpose is encapsulation(f.e. as container control used in a TabContainer’s TabPanel) a UserControl is a page replacement, hence does also the data access and event handling. You wouldn’t reuse this kind of UserControl often.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an algorithm that calls several functions to process its data. Each of
does one perform better over the other in terms of indexing/quering etc ? e.g.
Which will perform better when searching for a key with a specific prefix in
When using the Entity Framework, does ESQL perform better than Linq to Entities? I'd
Or better said: When to use array as a field data type in a
I am writing code to migrate data from our live Access database to a
I have some hierarchical data - each entry has an id and a (nullable)
We are in the progress of migrating Data Access Layers to a newer, more
tl;dr I'm getting better performance with my erlang program when I perform my CPU
I have a data access API that say looks something like: public interface IDataAccess

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.