Odd use of templates?

I

Iain

I'm building a data drive page. What I'd like to do is to put a number of
templated controls on the page and for each data item I want to put on the
page to select one of them (through an attribute in the data) to use to
display that particular data item.

So, unlike a datagrid, the controls for a particular template will not all
be grouped together.

In other words, I'd like to be able to apply data items to a templated
control several times and place the results at various points on the page.

so the page might look like

<MC:Control1 ... ID="Ctrl1">
<templateThing></templateThing>
....
</MC:COntrol1>
<MC:Control2 ... ID="Ctrl2">
<templateThing></templateThing>
....
</MC:COntrol2>


and my data (cml of course!) may look like

<Stuff>
<Data UseControl="Ctrl1">...</Data>
<Data UseControl="Ctrl2">...</Data>
<Data UseControl="Ctrl2">...</Data>
<Data UseControl="Ctrl1">...</Data>
<Data UseControl="Ctrl1">...</Data>
</Stuff>

So the visual output will be a 5 chunks of information, with 2 layout types
as you see.

I've written Templated Data Controls in ASP.NET 1.1., but I can't quite get
my head around this one...

Iain
 

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,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top