Saed Al Shaar Dev Tips and Tricks

.NET and SharePoint from a different angle!

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

Single Post Navigation

One thought on “LINQ Datasource and Error: Operator ‘=’ incompatible with operand types ‘String’ and ‘Int32’

  1. I needed to draft you that very small word to finally say thanks a lot yet again for all the unique solutions you have provided in this article. This has been so particularly generous with people like you to deliver extensively precisely what a few individuals could possibly have offered for sale as an e book to make some dough on their own, most notably now that you might have done it if you ever wanted. Those inspiring ideas additionally served as the great way to be sure that other individuals have the identical fervor the same as my personal own to know a little more around this issue. I’m certain there are lots of more pleasant opportunities up front for those who look over your blog post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: