开发者

Strange bug when using LINQ2SQL trying to databind a repeater

开发者 https://www.devze.com 2023-03-11 22:07 出处:网络
I have a strange bug when using LINQ2SQL. I try to bind a repeater with this code : OrthEvalFormulaire o = oRepository.GetTable开发者_如何学运维().FirstOrDefault(x => x.IdOrthEvalFormulaire == IdO

I have a strange bug when using LINQ2SQL. I try to bind a repeater with this code :

OrthEvalFormulaire o = oRepository.GetTable开发者_如何学运维().FirstOrDefault(x => x.IdOrthEvalFormulaire == IdOrthEvalFormulaire);

repCategorie.DataSource = o.OrthEvalCategorie.ToList();
repCategorie.DataBind();

In the debugger i can see that the datasource got the single record which is supposed to get.

Once i call databind i can see that the repeater have 1 item in the count.

But when the page get showed, nothing.

Any ideas ?

Thanks a lots !


Alright. This was a code 18. (My fault) I was binding some other datasource somewhere else to that repeater. -_- I can't believe i did this. Ouch.. 2 days to find this.

0

精彩评论

暂无评论...
验证码 换一张
取 消