provide several values for a String property

Discussion in 'ASP .Net Building Controls' started by Oleg Ogurok, Sep 9, 2003.

  1. Oleg Ogurok

    Oleg Ogurok Guest

    Hi all,

    If you look at the properties window of a HyperLink control (during the
    design time), you'll notice that its property Target is a System.String,
    which has several pre-defined values, such as "_self", "_blank", etc.
    Moreover, the designer allows you to enter your own custom property value.

    How can I implement the same behavior in my custom control? Is there an
    Attribute one can use to supply several pre-defined values?

    Oleg Ogurok, Sep 9, 2003
    1. Advertisements

  2. Yes. You can assign a TypeConverter to your property, and use the
    GetStandardValues and GetStandardValuesExclusive methods.
    John Saunders, Sep 10, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.