Data repeater

S

SimonZ

I have data repeater.

One of the row is defined:
<ItemTemplate>
<asp:TableCell >
<%If viewState("type") = "3" then%>
<%# writeLine(DataBinder.Eval(Container.DataItem,
"name")%>
<%else%>
<%# writeLine1(DataBinder.Eval(Container.DataItem,
"name1")%>
<%end if%>
</asp:TableCell>
</ItemTemplate>
But this won't work. There is no error message but the row is empty.

If I write like:
<ItemTemplate>
<asp:TableCell >
<%# writeLine1(DataBinder.Eval(Container.DataItem,
"name1")%>
</asp:TableCell>
</ItemTemplate>
or
<ItemTemplate>
<asp:TableCell >
<%# writeLine(DataBinder.Eval(Container.DataItem,
"name")%>
</asp:TableCell>
</ItemTemplate>

then works in both cases.

How should I write my example that I'll get the result?

Thanks,S
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top