[Mono-dev] [BUG] Property-Subproperty option form in ASP.NET

Marek Habersack grendel at caudium.net
Mon Feb 13 18:35:46 EST 2006


On Mon, Feb 13, 2006 at 03:28:12PM +0100, Marek Habersack scribbled:
> Hello,
> 
>   Does Mono support the 
> 
>  <asp:Control Property-Subproperty="value"/>
> 
>  syntax used by Microsoft in their ASP.NET 2.0 examples on http://asp.net/?
> If not, where should I start to look if I wanted to implement it for Mono?
> 
> thanks,
> 
> marek
I'm sorry for replying to my own post, but I think I've found a bug in the
support for the above. I was testing the TreeView control samples from
asp.net while I discovered that code like:

<asp:TreeView ID="TreeView"
            RootNodeStyle-ImageUrl="~/images/xp/computer.gif"
            ParentNodeStyle-ImageUrl="~/images/xp/folder.gif"
            LeafNodeStyle-ImageUrl="~/images/xp/ie.gif"
            LineImagesFolder="~/images/lines"
            ShowLines="true"
            runat="server">

doesn't quite work under Mono (latest SVN). At first it seemed that Mono
does not support the Property-SubProperty style, thus my previous mail. But
now I have confirmed that the correct code is generated for the above:

Line 190:         private System.Web.UI.Control __BuildControl_TreeView1() {
Line 191:             System.Web.UI.WebControls.TreeView __ctrl;
Line 192:             __ctrl = new System.Web.UI.WebControls.TreeView();
Line 193:             this.TreeView1 = __ctrl;
Line 194:             __ctrl.RootNodeStyle.ImageUrl = "~/images/xp/computer.gif";
Line 195:             __ctrl.RootNodeStyle = "~/images/xp/computer.gif";
Line 196:             __ctrl.ParentNodeStyle.ImageUrl = "~/images/xp/folder.gif";
Line 197:             __ctrl.ParentNodeStyle = "~/images/xp/folder.gif";
Line 198:             __ctrl.NodeIndent = 20;
Line 199:             __ctrl.LeafNodeStyle.ImageUrl = "~/images/xp/ie.gif";
Line 200:             __ctrl.LeafNodeStyle = "~/images/xp/ie.gif";
Line 201:             __ctrl.ID = "TreeView1";
Line 202:             this.__BuildControl__bctrl_4(__ctrl.NodeStyle);
Line 203:             this.__BuildControl__bctrl_5(__ctrl.RootNodeStyle);
Line 204:             this.__BuildControl__bctrl_6(__ctrl.HoverNodeStyle);
Line 205:             this.__BuildControl__bctrl_7(__ctrl.Nodes);
Line 206:             return __ctrl;
Line 207:         }

(Lines 195, 197, 200 are generated as the result of my deliberate breaking
of the code to get the backtrace while visiting the page).

Despite the fact that the ImageUrl property of the various *NodeStyle
TreeView properties is set properly above, the get accessor for ImageUrl in
TreeNodeStyle never gets called. That causes the MS TreeView samples to
behave differently under Mono.

Should I file a bug, or does somebody already know the cause for the above
bug?

tia,

marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060214/d06cfb29/attachment.bin 


More information about the Mono-devel-list mailing list