Is there a way to use a DataBinder.Eval statement as an index of a specific array in an ASPX page?

607 views Asked by At

Is there a way to use a DataBinder.Eval statement as an index of a specific array in an ASPX page?

I'm trying to develop a page containing a list of bibliographic references, for which I'm using the ASP.NET 2.0 Repeater control.

I'm quite new to ASP.NET, so I've carefully read the various answers about Formatting DataBinder.Eval data and using values within if conditions in mark up which both deal with the usage of DataBinder.Eval statements, but I'm stuck with my array (which is called Refbib() )...

I tried this :

<%# RefBib(System.Convert.ToInt32((DataBinder.Eval(Container.DataItem, "id")!="") ? DataBinder.Eval(Container.DataItem, "id"):0))%>

for which I received an error message BC30203: Identifier expected

Could someone explain what is wrong in my syntax?

0

There are 0 answers