LinqDataSource Where Clause Syntax for And/Or operator?

Posted on 2008-11-16
Last Modified: 2012-05-05
What is the syntax for And/Or within a LinqDataSource where clause?
something like...

 Where="ANIMAL_TYPE in('Dog', 'Cat')"
Question by:ChiBella

    Author Comment

    Here is where I want the where clause...again, how do you specify and/or/ in within this where clause?    

    <asp:LinqDataSource ID="" runat="server"
            Select="new (animal_type)"
             Where="animal_type in('DOG','CAT')"
    LVL 28

    Accepted Solution

    Where ANIMALS.AnimalType = "DOG" OrElse ANIMALS.AnimalType = "CAT" .....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Normally a window is moved by clicking on the caption bar and dragging. You may want your user to be able to move borderless forms or move a form by clicking anywhere in the form without the limitation to the caption bar. There are many ways to do i…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now