Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Experts! i have question on how can check the value from another textbox to another.

this is my vb form:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#026c9a9ac51f46a38e8bb04fc1735d39[^]

my code:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#9efc1ec900294ea9b5bbb50ffa9d4b4d[^]

Problem:
as u can see in the picture. " yEs" is wrong because letter "E" is on capital letter.. i want to make it check as long as the user type the right answer. plss help..
Posted
Updated 30-Jan-13 0:01am
v2

in button click event...
if condition should be like below
VB
if AnswerTextbox.Text.ToLower() = yourAnswer.Text.ToLower() then


ToLower() will convert both textbox values in lower case and then it will compare them

Happy Coding!
:)
 
Share this answer
 
v2
Comments
akosisugar 30-Jan-13 6:40am    
sir tnx!awesome!perfect!
Aarti Meswania 30-Jan-13 6:47am    
welcome! :)
Glad to help you! :)
Please Use like below
C#
string.Equals(a, b, StringComparison.CurrentCultureIgnoreCase);

Hope this helps
 
Share this answer
 
v2
Comments
Jameel VM 30-Jan-13 6:22am    
If you want to check case sensitive.Use the above code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900