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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:57:21+00:00 2026-06-02T08:57:21+00:00

I understand that whenever you create a property for a user control, you can

  • 0

I understand that whenever you create a property for a user control, you can set the property value through declarative syntax, so you can have something like this:

<uc1:MyControl id="MyControl1" runat="server" Text="Hello" Number="10" Access="ReadWrite" />

These attributes set the value for properties of type:

  • Text is String
  • Number is Integer
  • Access is Enum

I wouldn’t be able to set a public property of type “Array” or “Control” in declarative markup. (or can I?)

My question is:

What is the complete list of Types that can be set directly with declarative syntax as attributes in a control?

  • 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-02T08:57:28+00:00Added an answer on June 2, 2026 at 8:57 am

    Ok, after some time with this question without being solved, finally I found the official answer in this article at the MSDN library.

    Turns out that those properties that can be persisted as attributes are called Simple Properties and must be a string or a type that easily maps to a string. Here’s an extract of the article:

    ” A simple property is a property whose type is a string or a type that
    maps easily to a string. A simple property is persisted as an
    attribute on the control’s opening tag without any work on your part.
    Properties of type String and primitive value types in the .NET
    Framework class library such as Boolean, Int16, Int32, and Enum are
    simple properties. “

    So I had the list almost complete in my question. Properties that can be set directly with declarative syntax (as atributes) must be of the following types:

    • String
    • Boolean
    • Int16
    • Int32
    • Enum
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an activity which contains a Button,Whenever user click on button, we create
I understand that whenever I have a function that has more than four arguments
I understand that the elements of a python set are not ordered. Calling the
I understand that some countries have laws regarding website accessibility. In general, what are
Whenever I have needed to create a class file from an XML XSD schema,
I understand that if the gwt application needs to support multiple locale values, all
I understand that psycopg2 is more of a DB driver, and SQLAlchemy is an
I understand that there are several ways to blend XNA and WPF within the
I understand that they are both supposed to be small, but what are the
I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is

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.