restrict duplicate data insertion using textbox
in my table i already have a male
if enter ma le it allows the data to insert into sql how to restrict these kind of records
Restrict duplicate data insertion using textbox
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Siva SankarRank #9,790 · 202 reputationPosted Apr 29, 2015, 3:02 AM EDT
Trim the text which was entered in textbox....
like... txtname.Text.Trim()
Rajkiran SwainRank #165 · 14.4K reputationPosted Apr 29, 2015, 3:10 AM EDT
muthukumar146 reputationPosted Apr 29, 2015, 4:18 AM EDT
Manoj Kumar Mandal198 reputationPosted Apr 29, 2015, 5:17 AM EDT
str = str.toLower().Trim();
Will convert your string to lower case and remove all the whitespaces between text.