473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

findByValue

I have ASP.NET list control

I am using

lstDSN.Items.FindByValue(srcData)
how can I find by case insensetive? I want to ignore Items case and srcData
case?

Thanks


Nov 19 '05 #1
2 2326
"abcd" <ab**@abcd.com> wrote in
news:OS**************@TK2MSFTNGP09.phx.gbl:
I have ASP.NET list control

I am using

lstDSN.Items.FindByValue(srcData)
how can I find by case insensetive? I want to ignore Items case and
srcData case?


Before adding the item to the list, use the function UCASE or LCASE to
capitalize all the entires.

Otherwise you'll have to rewrite the FindByValues function to handle case
insensitivity.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Thanks Lucas. Thats what I ultimately did...

I would be happy if Microsoft develops method like this

Syntax, FindByValue(what,isCaseSensetive)

lstDSN.Items.FindByValue(srcData,false)

this is just a thought, Microsoft experts knows better than me :)

cheers !


Lucas Tam wrote:
"abcd" <ab**@abcd.com> wrote in
news:OS**************@TK2MSFTNGP09.phx.gbl:
I have ASP.NET list control

I am using

lstDSN.Items.FindByValue(srcData)
how can I find by case insensetive? I want to ignore Items case and
srcData case?


Before adding the item to the list, use the function UCASE or LCASE to
capitalize all the entires.

Otherwise you'll have to rewrite the FindByValues function to handle
case insensitivity.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: vickie | last post by:
I have a sql server7 database using C#. The system runs fine until the user try to run a report. I get the following error: Object reference not set to an instance of an object. Description: An...
7
by: Reddy | last post by:
I am trying to prepopulate two drop down meus with results of two differnt SQL queries. I have written the following code. But I am getting errors. Can anybody please help me how to do this. I also...
0
by: Nir | last post by:
Hello all , I have a very strange problem with DropDownList . I am using this Code for select items in Drop Down : Dim Item As New ListItem() Item = cmb.Items.FindByValue(Data)...
1
by: Bill Gauvey | last post by:
I have a dropdown list with several items, one item has the value of \r\n. When I try to find the value it fails, the string being passed to it is comming out of a Hashtable. Other items work...
10
by: dhnriverside | last post by:
Hi guys Still having a problem with this dropdownlist. Basically, I've got 4. The first 2 work fine, then my code crashes on the 3rd. ddlEndTimeHour.Items.FindByValue(endTime).Selected =...
4
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
Hey, Well, I have a Problem. I have designed a table which has few fields which are being declared in the database of type .... char of length 10. and other fields with varchar 50 and...
10
by: ads | last post by:
hi, after binding the dropdownlist to a datasource, ive experience this error "Cannot have multiple items selected in a dropdownlist" after using the code:...
5
by: =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= | last post by:
Hello. I am reading a value from a table and trying to determine if that value exists in a list of values associated with a dropdownlist. If so, I select the value, otherwise, I don't. I haven't...
1
by: esd | last post by:
Hello folks, the two code blocks below do the same thing, which is set a few form field values. Clearly the first method is the most elegant but my question is which is best in terms of lightest...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.