I have a datatable. I need to fetch a certain column value based on the user input. For example, let’s say the datatable has two columns CountryID and CountryName.
I need to find CountryID in the datatable based on the user input country name. I could just open a connection with DB and run the query
select countryID from Country where countryName = @userinput
Is there anyway I could do this on the datatable.
1 Answer