Bitmap property of custom control, object cannot be created

Discussion in 'ASP .Net Building Controls' started by theis.netronic@freenet.de, Jan 27, 2005.

  1. Guest

    Hi,

    I have build a custom control with a Bitmap property inside:

    System::Drawing::Bitmap* myBitmap;
    __property System::Drawing::Bitmap* get_Bitmap( void )
    {return myBitmap;}
    __property void set_Bitmap( System::Drawing::Bitmap* tmpBitmap)
    {myBitmap = tmpBitmap;}

    When dragging my control onto a webform the corresponding .aspx file
    looks like following:

    <cc1:ctrl id="myCtrl1" style="Z-INDEX: 102; LEFT: 48px; POSITION:
    absolute;
    TOP: 128px" runat="server" Width="536px" Height="224px"
    Bitmap="System.Drawing.Bitmap">
    </cc1:ctrl>

    1) The parser rises at design time the error: "Parser Error: Cannot
    create an object of type 'System.Drawing.Bitmap' from its string
    representation 'System.Drawing.Bitmap' for the 'Bitmap' property"
    What is wrong? Which class- or property-attributes (e.g. ParseChildren
    ....) must be set? What else is to be done?

    2) Is it possible at design time to save values of complex properties
    to the the .resx file of the webform? With windows forms controls the
    ide (e.g. Visual Studio 2003) uses codeDOMSerialization to do that,
    but I didn't succeed in doing it with a web server control.

    Thanks.
     
    , Jan 27, 2005
    #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. Gandalf

    Masked bitmap from bitmap

    Gandalf, Jan 29, 2004, in forum: Python
    Replies:
    0
    Views:
    618
    Gandalf
    Jan 29, 2004
  2. xqggz
    Replies:
    1
    Views:
    456
    Victor Bazarov
    Jun 19, 2007
  3. Sunfire
    Replies:
    1
    Views:
    500
    Roland Dick
    Nov 10, 2007
  4. Rob Joosen

    Keep custom property-value in custom rendered control

    Rob Joosen, May 12, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    159
    Rob Joosen
    May 12, 2004
  5. anon
    Replies:
    0
    Views:
    221
Loading...

Share This Page