Geeks With Blogs
ICaramba Miguel Castro's blog about .NET and its effect on National Security, the Eco-system, and his daughter's sleeping patterns.

I while ago I posted the following posting: http://geekswithblogs.net/mcastro/archive/2006/01/19/66393.aspx, and it generated feedback that I thought was worth going over:

Daryl wrote:

I can't see how divs should be the default tag for composite controls. Conceivably, one could create a composite control consisting only of controls that are rendered as inline elements. The composite control could then be rendered inline as well. Making div the default tag would impose a layout constraint (divs are blocked elements by default). Then it becomes a necessity to override the default tag to fix the issue.

My reply:

You're missing the point Daryl.  It's perfectly acceptable and done quite a bit by Microsoft themselves, to render table layouts within your webcontrol.  If you do this, you have to make the default Div (or maybe even Table).  You have to deal with the layout constraint just like you would if you were coding your control contents directly into a form.  Writing controls is more than just wrapping one or more element, you certainly need to take layout into consideration too.  That's where providing table structures around your child controls comes in.  If you're saying that all controls should always just render inline elements only, I say that is a more serious layout constraint. 

By the way: I didn't post this reply as a new posting to embarrass anyone, but I wanted to make sure you read it, and I also thought the dialog is important enough for others to read it as well.

 

Posted on Monday, March 20, 2006 8:20 AM | Back to top

Copyright © Miguel A. Castro | Powered by: GeeksWithBlogs.net