Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Wednesday, March 28, 2012

Why templating the content of the UpdatePanel?

Many ASP controls use template for their content (theGridView being a good example). TheUpdatePanel has aContentTemplate property that, as the name suggests, contains the content of the UpdatePanel.

Yet, since the UpdatePanel is not a repeater control, I do not grasp (as a consumer of the ATLAS library) the interest of templating the content of the UpdatePanel. Does some has an idea why a ContentTemplate is used instead of the regular control children?

Thanks in advance,
Joannès
http://www.peoplewords.com

hello.

i'd say that a template let's you have complete control over the content of the updatepanel. if you had a property of another type, you'd only be able to use elements of that type (or of a derived type)


ThePlaceHolder is not templated and but can include any element (as long as they inheritControl which is not a real constraint). My question can maybe be rephrased as "Why did the UpdatePanel not follow the PlaceHolder design pattern?".

Joannès

hum...how about designer integration? i'm not sure because i really don't use the designer, but can you drag-n-drop controls from the toolbox into a placeholder control?