S3MP
S3MP

Reputation: 113

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

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?

Upvotes: 1

Views: 612

Answers (0)

Related Questions