FormView/Repeater/ Eval(FormView data)

D

David Thielen

Hi;

I have (lots of tags not shown):
<asp:FormView ID="EditUser" runat="server" DataSourceID="UserData"
DataKeyNames="username">
works: <%# Eval("UserName") %>
<asp:Repeater ID="mapRows" runat="server" DataSourceID="RoleData">
fails: <%# Eval("UserName") %>
</asp:Repeater>
</asp:FormView>

How do I get at data bound to the outer FormView inside the Repeater?
 
S

Steven Cheng[MSFT]

Hello Dave,

Thanks for your posting.

From your description, you'd like to access the parent container's
databinding context(DataItem) in the nested databound control's databinding
code, correct?

Based on my understanding, it is not quite easy to do so since the
ItemDatabound of template databound control only contains the current
databinding context's info. What's the detailed scenario of your
databinding page, are you dealing with some master/detail or parent/child
table data? I think we may look for some other approach to workaround it?

Please feel free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
D

David Thielen

Hi;

Yes, that is exactly what I want. If it can't be done in the aspx I can
easily do it in the code behind.
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top