Using an updatepanel inside repeater item

J

Jesper Rou

Hi all,

I have a peculiar problem in that I want to have an Ajax.Net update panel,
inside each item in a repeater.

Like so:

<repeater>
<itemtemplate>
<updatepanel>
<contenttemplate>
</contenttemplate>
</updatepanel>
</itemtemplate>
</repeater>

This works well enough, but a problem emerges when using DataBinding
expressions, like <%# DataBinder.Eval( Container.DataItem, "whatever" ) %>

The page fails with the somewhat logical error, that the updatepanel dosnt
contain a definition for DataItem.
I assume this is because the Container now points at the updatepanel.

Anyone have a workaround/fix for this?

- Jesper Rou / Creuna Denmark
 
J

Jesper Rou

I found the answer myself.

Using the <%# Eval( "field" ) %> shorthand solves the problem.

- Jesper
 

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

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top