Problem with Design-time behauviour

Discussion in 'ASP .Net Building Controls' started by Kristof Berger, Oct 26, 2004.

  1. Hi Group!

    I'm currently digging deeper into ASP.NET Server-Controls.
    My current "project" is a control that should be editable at design time (a
    little like the pane control).

    Well, the perfect thing would be to have just a portion of the control being
    editable, while the rest is not modifiable by the user / designer.

    As a first approach I wrote a control containing an instance of
    System.Web.UI.WebControls.Pane, nested in a HtmlTable.
    I'm not using these ascx constructs but "real" controls derived from
    WebControl, situated in assemblies.


    As you might see, this was not editable at design-time.
    I read a little and found out that I had to assign the Designer-Attribute,
    consuming my own designer - being derived from ReadWriteControlDesigner.

    Weeellll.....ok. I derived that class and overrode (is that really the right
    word? Sorry, german....) the GetDesignTimeHtml() Method.
    I noticed the control was still not editable unless setting the inherited
    ReadOnly-Property to false within the constructor of my
    Designer-Implementation.

    Done that. Stopped here.
    When setting the property, GetDesignTimeHtml() is not called anymore and all
    I get is a Canvas-like Area, looking exactly like the Pane Control.

    I read in some blog that this problem is known and "by design". Argh.
    Is that true? I can't believe that I have to stop my effort here. The
    article said that this might be obsolete with .NET 2.0 and "editable
    regions" and the like.
    But as we can't afford to switch over to .NET 2.0 right now (did anyone of
    you guys ever have a realease candidate as a framework for your customer's
    software?), I have to know wether there is a possibility to achieve what I
    described above.
    Might ascx be a solution?

    When 5 of you tell me that there is no freakin' way out, I might believe you
    ;-)

    Thanks for any advice!

    cu

    - kb
    Kristof Berger, Oct 26, 2004
    #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 Cook
    Replies:
    0
    Views:
    447
    Paul Cook
    Nov 6, 2003
  2. Tzury Bar Yochay
    Replies:
    3
    Views:
    482
    Jacob Yang [MSFT]
    Nov 29, 2003
  3. =?Utf-8?B?cmtibmFpcg==?=

    Design Time vs Run Time DataGrid

    =?Utf-8?B?cmtibmFpcg==?=, Feb 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    593
    Karl Seguin
    Feb 1, 2005
  4. engsol
    Replies:
    2
    Views:
    947
    Dan Bishop
    Jan 26, 2004
  5. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
Loading...

Share This Page