Problem with Design-time behauviour

K

Kristof Berger

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top