Saed Al Shaar Dev Tips and Tricks

.NET and SharePoint from a different angle!

Archive for the tag “LINQ”

LINQ Datasource and Error: Operator ‘=’ incompatible with operand types ‘String’ and ‘Int32’

Hi folks,

It’s an issue when you try to filter LINQ datasource within Visual Studio, where you choose Control and then it will show “==” in the Operator as follows:

When you try to run the page, it will give you and error saying:
Operator ‘=’ incompatible with operand types ‘String’ and ‘Int32’

All what you need to do is to change the Convert the Parameteres into the required data type as follows:

And it will magically work!

Happy programming!!
Saed

Advertisements

Post Navigation

%d bloggers like this: