Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Advanced control problems

Reply
Thread Tools

Advanced control problems

 
 
Jason
Guest
Posts: n/a
 
      08-18-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Advanced Python Programming Oxford Lectures [was: Re: *Advanced*Python book?] Michele Simionato Python 1 03-27-2010 06:10 AM
Why the designer don't persist the property of my control? (Advanced) Umut Tezduyar ASP .Net 0 11-29-2005 01:04 AM
Advanced Search Control =?Utf-8?B?amF2YXd6bA==?= ASP .Net 1 06-14-2005 06:55 PM
How to do more advanced paging with the DataGrid control Daniel Walzenbach ASP .Net 2 01-16-2005 05:32 AM
Calendar control - advanced tweaking Paul W ASP .Net 0 10-26-2004 03:01 PM



Advertisments