Advanced control problems

Discussion in 'ASP .Net Building Controls' started by Jason, Aug 18, 2003.

  1. Jason

    Jason Guest

    Hi,

    I am using .net 1.0 sp2. I also have on another machine .net 1.1 though
    until such time as the template control problem is fixed in asp.net 1.1 i
    don't use it except to try new code out on.

    So i wrote myself a control which has desing time support built in - namely
    that i can add other controls to the page in deisgn time - and a property in
    my control can display a list of names of controls on an aspx page if they
    implement a specific interface. this is achieved you guessed it by using a
    UITypeEditor and the associated attribute Editor over the respective
    property.

    All is well. The problem comes from my TypeConverter implementation to
    convert the string names returned back into my interface. Under version 1.1
    decorating my interface class (the one which the controls implement) with a
    typeconverterattribute specifying my custom type converter works perfectly
    in VS.Net 2003. Using VS.Net 2002 however the same code seems to not be
    calling out to my typeconverter. Actually i tell a lie. I debugged the
    design time control and i noticed after it had returned from EditValue (with
    a string of the control name) it did not use my typeconverter until after it
    had failed???????? So it goes like this.

    I drop down the listbox in the properties window, it is populated by
    editvalue with only those controls on the page that implement my interface,
    i select one from the listbox and then

    Properties Window popus up saying
    "Invalid property value."
    Click Details button
    "Object type cannot be converted to target type."


    then it actually breaks into my TypeConverter code and calls CanConvert,
    wherein it returns true because the type passed in is a string (the same
    type i returned from editvalue). Even though it returned true a call to
    ConvertFrom never actually runs thereafter.

    Anyone know what i am doing wrong? I know i am doing something wrong surely
    because so many other controls, i.e the validators, all use strings to
    return the ControlToValidate and they work fine.

    Thanks in advance

    J
     
    Jason, Aug 18, 2003
    #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. Paul W
    Replies:
    0
    Views:
    419
    Paul W
    Oct 26, 2004
  2. Daniel Walzenbach
    Replies:
    2
    Views:
    410
    Daniel Walzenbach
    Jan 16, 2005
  3. =?Utf-8?B?amF2YXd6bA==?=

    Advanced Search Control

    =?Utf-8?B?amF2YXd6bA==?=, Jun 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    510
  4. Umut Tezduyar
    Replies:
    0
    Views:
    450
    Umut Tezduyar
    Nov 29, 2005
  5. Michele Simionato
    Replies:
    1
    Views:
    629
    Lacrima
    Mar 27, 2010
Loading...

Share This Page