G
Guest
Hi all,
I am trying pass a value to the DataSource method in a DataList like below.
DataSource = <%# GetData(DataBinder.Eval(Container.DataItem, "ID"))%>"
I get an error with this code, and am wondering if someone can show me the
correct syntax.
I have asked this question before, but unfortunately i don't remember the
correct syntax.
I know i can acheive the desired result using code behind 'ItemDataBound',
but am prefering to do it in the aspx page itself..
All help appreciated.
<aspataList ID="dlTest"
DataKeyField = "ID"
DataSource = <%# GetData(DataBinder.Eval(Container.DataItem,
"ID"))%>">
<ItemTemplate><%# DataBinder.Eval(Container.DataItem,
"Name")%></ItemTemplate>
</aspataList>
Cheers,
Adam
I am trying pass a value to the DataSource method in a DataList like below.
DataSource = <%# GetData(DataBinder.Eval(Container.DataItem, "ID"))%>"
I get an error with this code, and am wondering if someone can show me the
correct syntax.
I have asked this question before, but unfortunately i don't remember the
correct syntax.
I know i can acheive the desired result using code behind 'ItemDataBound',
but am prefering to do it in the aspx page itself..
All help appreciated.
<aspataList ID="dlTest"
DataKeyField = "ID"
DataSource = <%# GetData(DataBinder.Eval(Container.DataItem,
"ID"))%>">
<ItemTemplate><%# DataBinder.Eval(Container.DataItem,
"Name")%></ItemTemplate>
</aspataList>
Cheers,
Adam