What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 33632 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > Search list Box values using C#.net ...
Naraayanan

Search list Box values using C#.net

Replies: 7 | Posted by: Naraayanan on 6/29/2012 | Category: C# Forums | Views: 772 | Status: [Member] | Points: 10  


Hi,
How to search list values in C#.net. In my application , It has a Textbox, button and ListBox. user enter in the Textbox and It will show in the List box when user clicks Button. but i don't want to repeated value in the list box.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Premalatha
Premalatha  
Posted on: 6/29/2012 11:49:31 AM
Level: Starter | Status: [Member] | Points: 25

This may use for u;

http://www.codeproject.com/Articles/30485/Using-Find-in-a-Generic-List

Premalatha
Software Engineer

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Superb1986
Superb1986  
Posted on: 7/1/2012 9:52:06 AM
Level: Starter | Status: [Member] | Points: 25

HI,
You can use the linq query with the distinct. because you are going to show only the description in the listbox so you can apply the distinct with the description. for eg
var mycoll = (from item in objList
where item.Desc == textbox.text
select new { Description = item.Desc}).Distinct().ToList();

So you can use this powerfull linq, i hope you may get an idea.

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Premalatha
Premalatha  
Posted on: 7/2/2012 2:12:06 AM
Level: Starter | Status: [Member] | Points: 25

Ok,

Thank you

Premalatha
Software Engineer

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Calvert
Calvert  
Posted on: 7/2/2012 3:32:36 AM
Level: Starter | Status: [Member] | Points: 25

You should Use Date time method.Date Time is immutable, and any method to modify it returns a new DateTime, it does not alter the one you are using.you can parse it to string, and change the string to your own "datetime" format but remember, this is not going to be a real DateTime value any longer.
http://www.dapfor.com/en/net-suite/net-grid/tutorial

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Premalatha
Premalatha  
Posted on: 7/3/2012 5:21:13 AM
Level: Starter | Status: [Member] | Points: 25

Ok thank you,

Premalatha
Software Engineer

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Perfect.Chourasia@Gmail.Com
Perfect.Chourasia@Gmail.Com  
Posted on: 7/4/2012 6:14:03 AM
Level: Starter | Status: [Member] | Points: 25

thanks for information

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://sandeep-chourasia.blogspot.com/

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Premalatha
Premalatha  
Posted on: 7/4/2012 7:00:40 AM
Level: Starter | Status: [Member] | Points: 25

Your Welcome

Premalatha
Software Engineer

Naraayanan, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 3:28:27 PM