<asp:Repeater id="ParentRepeater" runat="server"
OnItemDataBound="OnItemDataBound">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
<ItemTemplate>
<li>###</li>
</ItemTemplate>
</asp:Repeater>
I dont want to bind it using eval in the aspx page. I do prefer to inject
the correct value using some code (?) in the .cs page. Is it possible? Is it
possible to bind without using the default way, the eval line?
Thx anyway,
Regards,
André
"Mark Rae [MVP]" <> escreveu na mensagem
news:...
> "André Freitas" <andrefreitas> wrote in message
> news:...
>
> [please don't top-post]
>
>>>> Without any .net code in aspx page.
>>>
>>> What does that actually mean?
>>>
>>> Are you trying to use a Repeater without any server-side code to bind
>>> the data to it?
>>>
>>> Are you using one of the DataSource controls...?
>>
>> Yes, im using:
>>
>> rptParent.DataSource = obj;
>> rptParent.DataBind();
>
> OK, so you're *not* using DataSource controls - that's fine...
>
> However, I'm struggling to see what the problem is... Eval is the standard
> way of using the Repeater control. See the following MSDN article:
> http://msdn.microsoft.com/en-us/magazine/cc163780.aspx
>
> The way you're doing it seems fine to me...
>
>
>> And I do like the aspx page without any cs code (eval). Is it possible to
>> be done in the .cs page?
>
> Typically, server-side code will reside in separate class files, though
> you can use inline coding if you want to - it's a personal preference...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net