Wednesday, May 6, 2009

Operator '==' incompatible with operand types 'Int32' and 'Object'


The exception occurs because anytime a ControlParameter in the WhereParameters collection (IDictionary) is null, it gets treated as type Object causing the LINQ dynamic expression parser comparison to fail.

Solution : SET LINQDataSource the property DefaultValue="0"


TableName="Documents" Where="DocumentSpecialtyID == @DocumentSpecialtyID">




 
  Reactions:

comments

0 Responses to "Operator '==' incompatible with operand types 'Int32' and 'Object'"
 

Copyright 2009 All Rights Reserved Shakti Singh Dulawat