473,399 Members | 3,919 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,399 software developers and data experts.

How to compare single value of textbox with all the value of dataset

hello sir,

my name is rakesh salwe. i wanna compare the value which is entered by user in textbox with the all the values present in the dataset one by one for login purpose. thank you
Sep 15 '10 #1
2 2888
Plater
7,872 Expert 4TB
DataTable objects have a Select() function which you can use to grab a DataRow[] (array) of any rows that match the select statement.

So if you said:
Expand|Select|Wrap|Line Numbers
  1.  
  2. DataRow[] results=myDataTable.Select("Username='"+tbUsername.Text+"'");
  3. // results now contains any rows from the DataTable 
  4. // that have the contents of the textbox as the value for the Username column
  5.  
Sep 15 '10 #2
This can be done using foreach loop.
Sep 16 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bryan | last post by:
Hello: I need to retrieve the value of a textbox control in a asp.net datagrid using Javascript. Can anybody help out. I believe the control clientID needs to be passed client side so the...
0
by: Mark | last post by:
All, Excuse the re-post but I have found something which works for the UserID but not for the Password (see previous post below). The problem is I don't understand how it works and therefore...
2
by: Robert | last post by:
I'm new to C# but learning quickly. What i have is a prog that does a connection to a database and pulls in a (untyped) dataset during runtime. I have some bound data to textboxes etc and those...
1
by: RockNRoll | last post by:
I'm new to ASP.NET and need to filter a datagrid based on a textbox value. I have a working datagrid and would like the WHERE part of my SQL statement to call the value of a textbox and refresh...
9
by: Stephen | last post by:
OK, I have filled a DataSet with an SqlDataAdapter and I just want the data in one column of one row. How can I do this since the following gives me the infamous 'Object reference not set to an...
0
by: puneet28in | last post by:
Hello, I want to retrieve bounded textbox value of a form whenever user click on next record. I have used the textbox.value property but it always gives the old or the initial value. Help me...
0
by: sejal17 | last post by:
Hello Everyone, My application is touch srceen aplication( in ASP.NET with C#). i have done here is that ,i m adding products in shopping cart with dafault product quantity one.here i...
4
by: cwilliams01 | last post by:
Hello I am new to VB.NET, so sorry if this is really obvious. I have written the following code to fill my dataset from a stored procedure requiring 1 paramter input (from a SQL database). The...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
3
by: buterfly0707 | last post by:
hi evryone.. i want to get the text box value to list box . And also i want this textbox value enter into the dabasex table called Area and @ th esame time insert this value to List box. here is...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.