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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:47:56+00:00 2026-06-18T06:47:56+00:00

I have created a user control and defined properties in order to pass values

  • 0

I have created a user control and defined properties in order to pass values from .aspx page. As a next step I want to define values that a user control can accept in those properties.

For example if it is a property expecting a bool value, I want to be able to select either true or false, etc.

Not really sure how to start.

  • 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-06-18T06:47:57+00:00Added an answer on June 18, 2026 at 6:47 am

    Your question is a little vague, but here goes:

    1. If your property is boolean, there are only 2 possible values, so you don’t need to do anything more.
    2. If you have a set of integer values, you could set them up as an Enum.
    3. If you have a set of string values, you might do better to rework them into an Enum and use one of several techniques (ask if you need to) to associate text with numeric values.

    All of this assumes discrete values. If you have a range of continuous values (-1.000 to 1.000, or something like that) you will probably need to write validation code in the Getter and Setter of your property. Another option would be to use DataAnnotations on your underlying model.

    If you just need to know how to prevent bad data from being entered into a web control within your user control, you need to look into validation controls.

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

Sidebar

Related Questions

I have created a user control with web controls defined in the aspx file
I have created a web user control called Activity. I have defined a public-facing
I have a recursively defined user control that needs the following properties: there are
I have created a user control (link) which has a label and a button.
I have created a user control (CheckedDirTree) that exposes a CheckedFolder property which in
I have created an Address user control which is as follow: <%@ Control Language=C#
I have created a COM enabled .NET User Control and am wondering what is
I have created a wpf application into which I have added a user control
I have created a UserControl in WPF. This user control consists of a border,
I have a user control that I've created, however when I go to add

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.