Link to home
Start Free TrialLog in
Avatar of Sheritlw
SheritlwFlag for United States of America

asked on

linqdatasource where bit field value = true

Hi EE.

I have a dropdownlist bound to a linqdatasource.   The table it is bound to has a bit field.
I simply want to filter the linqdatasource by this field.
i.e. where bitfield = true

How do I do this?

Thanks
Avatar of ValleyENT
ValleyENT

Avatar of Sheritlw

ASKER

I love those articles and that is where I have got most of my information.
Problem is with the boolean value I get an error regarding the == not being int32.

I need to know how to filter by a boolean value.

Thanks


<asp:LinqDataSource ID="LnqLUServicesPrimary" runat="server" 
                                       ContextTypeName="SalonDataClassesDataContext" TableName="ServicesLUs" 
                                       Where="MultiServ == @MultiServ">
                                      <WhereParameters>
                                            <asp:Parameter Name="MultiServ" Type="Boolean" DefaultValue="true" />
                                       
                                      </WhereParameters>
                                  </asp:LinqDataSource>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Sheritlw
Sheritlw
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found answer