Writing a custom TemplateBuilder

J

jeffkretz

This is a real tricky issue, and I'm hoping someone here may have some
insight.

I'm building a custom control which, when done, will allow shorthand
entries in a template to be re-interpreted by the parser as data-bound
controls.

For example:

<itemtemplate>
<tr>
<td>[CustomerName]</td>
</tr>
</itemtemplate>

Would be built internally as something with the functional equivalent
of:

<itemtemplate>
<tr>
<td><asp:Literal Text="<%# DataBinder.Eval(Container.DataItem,
"CustomerName") %>" runat="server" /></td>
</tr>
</itemtemplate>

However, to actually make this work, I somehow have to use a custom
TemplateBuilder, and I wouldn't know where to start. Can anyone point
me in the right direction? Even if it's only to someone else that
might be able to answer my questions?

Thanks,
JK
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top