Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Problem with Design-time behauviour

Reply
Thread Tools

Problem with Design-time behauviour

 
 
Kristof Berger
Guest
Posts: n/a
 
      10-26-2004
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


 
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
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments