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 31979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:41:24+00:00 2026-05-10T13:41:24+00:00

Over the past few years I’ve changed from having a long flowing page of

  • 0

Over the past few years I’ve changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I’ve always had a bit of a discussion between co-workers on best practices.

Should you have properties that you populate, or use paramterized sub’s to load the information in your controls?

Part of my fear of using paramteter’s is the fact that I cannot make sure that everything will be populated.

What is the basic rule’s for using interfaces? I’ve never created one. And should I try this, or stay with a ‘sub load’?

  • 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. 2026-05-10T13:41:25+00:00Added an answer on May 10, 2026 at 1:41 pm

    I’m not sure if interfaces are going to help you a lot here. My understanding is that you are breaking a page down into set of ‘composite’ user controls that contain other controls, and you want to decide whether to use properties for setting values.

    I guess this really depends on how the user controls are designed and whether they are being dynamically added to a page etc (one possible scenario). I have a personal preference for specifying stuff in a constructor or using a factory method to create controls. I assume responsibility at creation for making sure that everything is set. My experience with properties is that I’ll sometimes forget to set something and not realize my mistake. Your point about setting properties or using a sub, and everything being populated doesn’t make a lot of sense to me. If you have some sort of dependency and need something else to be loaded then this could happen irrespective of whether it’s a property or sub.

    I would refer to any book on VB.NET/C#/OOP to see the syntax for interfaces. Interfaces basically describe a contract for a class. If you have class A and B and both implement an interface called ITime then both will provide all of the methods defined on ITime. They can still add their own methods but they must at minimum include an implementation of ITime’s methods (eg. we might have GetDate(), GetCurrentTime() as methods on ITime). An interface doesn’t tell class A or B how those methods should work – just their name, parameters and return type. Lookup inheritance in an OOP book for more information on how interfaces inheritance is different from implementation inheritance.

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

Sidebar

Related Questions

Over the past few years I've been on projects where we've run into a
I've been getting into Ruby over the past few months, but one thing that
I've used AWS and various forms of Linux over the past few years, but
I recently noticed over the past few weeks that Google Chrome appears to be
I work in an environment that is totally .NET. However, over the past few
I just finally after trying many time over the past few years, got my
I've noticed in two different projects over the past few days that distances aren't
I run an arcade site and over the past few years it's had many
One of my web apps has grown over the past few months from a
Over the past few years I've had to delve deeper into Spring's source. I've

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.