tags:

views:

248

answers:

2

This line of code

((Matches)Container.DataItem).MatchID

works in C# but in VB.NET, when used in a Repeater, I get the error

'Matches' is a type and cannot be used as an expression.

Suggestions?

+1  A: 

That's because it is C# and not VB.NET.

I think the cast syntax for VB.NET looks something like:

CType(Container.DataItem, Matches).EmpID

but no doubt a VB.NET expert will chime in if this is wrong.

Joe
Thanks Joe for the help
Hitz
+1  A: 

Try the following

DirectCast(Container.DataItem,Matches).MatchID
JaredPar
Awesome Jared..Have a great weekend!
Hitz