Thanks Nick, the syntax below worked.
Nick Cipollina <[EMAIL PROTECTED]> wrote:
You would use the following code:
Supposing you had a DataTable object called dt
dt.Select("Name_agncy_nbr LIKE 'ABCBS*'");
This will return an array of DataRow objects where the Name_agncy_nbr
column Starts With ABCBS.
Thanks,
Nick Cipollina
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jean Haidar
Sent: Tuesday, July 25, 2006 5:53 PM
To: [EMAIL PROTECTED]
Subject: LIKE in ASP.NET
we are trying to filter Grid View in ASP.Net using ( filterexpression
="='{0}' ").
we would want to accomplish the same as "Starting with" or LIKE in
Visual FoxPro, how do you do that in ASP.NET?
for example, how can we replace this long string of Name_agncy_nbr
with
If RadioButtonList1.SelectedIndex = 1 Then
ObjectDataSource1.FilterExpression = "NAME_STAT='{0}'AND
(NAME_AGNCY_NBR='ABCBS-IND'OR NAME_AGNCY_NBR='ABCBS-C' OR
NAME_AGNCY_NBR='ABCBS-W' OR NAME_AGNCY_NBR='ABCBS-SW' OR
NAME_AGNCY_NBR='ABCBS-NW' OR NAME_AGNCY_NBR='ABCBS-WC' OR
NAME_AGNCY_NBR='ABCBS-SC' OR NAME_AGNCY_NBR='ABCBS-NE' OR
NAME_AGNCY_NBR='ABCBS-SE')"
End If
with one single line
NAME_AGNCY_NBR='ABCBS' &&
like we do in VFP
please email us an example.
Thanks,
Jean
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.