How to get the value inside a repeaters itemtemplate?

mitchellraw

New Member
\[code\]<asp:Repeater ..><ItemTemplate><% string age = Eval("a").ToString() %><% age = a.ToLower(); // real stuff here%><p>Hello <%# Eval("name") %> you are <%= age %> old</p></ItemTemplate> </asp:Repeater>\[/code\]I'm getting an error saying:\[code\]Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.\[/code\]
 
Back
Top