By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,262 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,262 IT Pros & Developers. It's quick & easy.

Using an updatepanel inside repeater item

P: n/a
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
Oct 19 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
could you please post a sample that replicates this issue?

Regards,
Manish
"Jesper Rou" wrote:
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
Oct 19 '07 #2

P: n/a
I found the answer myself.

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

- Jesper
"Jesper Rou" <je****@rou.dkwrote in message
news:47***********************@news.sunsite.dk...
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


Oct 23 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.