Extending WebControl - PropertyGrid to hold LinkButton

Discussion in 'ASP .Net Web Controls' started by Kevin, Jan 2, 2008.

  1. Kevin

    Kevin Guest

    Hi there,

    I am trying to inherit from an existing webcontrol, however I want to add a
    property to the control that will be exposable in the property grid. The
    property in question has a type of LinkButton. I want to define the
    LinkButton that this control must use(I want to hook it's click event up) at
    design time. However I'm having problems with setting it. The property
    appears, and lists any current LinkButtons on my webform in a dropdown list,
    which is great, but when I select a value, I get the following error similar
    to:

    "System.Web.HttpParseException: Cannot create an object of type
    'System.Web.UI.WebControls.LinkButton' from its string representation
    'linkButtonGo' for the 'GoButton' property."

    I think I have to implement a TypeConverter or something along those lines,
    but I haven't had any success with that becasue quite frankly im not too sure
    exaclty what I need to do to prevent this exception. Can someone please help
    me out here?

    Thanks in advance,
    Kevin
     
    Kevin, Jan 2, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGVlcGFr?=

    PropertyGrid-Need HELP

    =?Utf-8?B?RGVlcGFr?=, Jul 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,275
    =?Utf-8?B?RGVlcGFr?=
    Jul 15, 2005
  2. Dave Wurtz

    PropertyGrid - ReadOnly

    Dave Wurtz, Nov 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,839
    Dave Wurtz
    Nov 14, 2003
  3. Jéjé
    Replies:
    1
    Views:
    443
    Jéjé
    Jan 24, 2004
  4. Sathyaish
    Replies:
    3
    Views:
    3,112
    Sathyaish
    Sep 8, 2005
  5. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    188
    Sathyaish
    Sep 8, 2005
Loading...

Share This Page