Click here to Skip to main content
16,012,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want coding to validate the textbox using customvalidator to check whether the word match with the database wordcolumn.
In that, txtbox should be filled by user.
then that word should match a particular field in the database.
and matched field's row in db should be displayed in a panel.
Posted
Updated 25-Jul-11 23:35pm
v2
Comments
shefeekcm 23-Jul-11 2:43am    
is that textbox value comes from te database....question is not clear.
kwhiterosek 23-Jul-11 3:54am    
no.txtbox should be filled by user.
then that word should match a particular field in the database.
and matched field's row in db should be displayed in a panel.
kwhiterosek 26-Jul-11 5:33am    
help me sir...


1 solution

You just assign control to validate in customvalidator and write your code in this event

C#
protected void CustomValidator1_ServerValidate(object source,ServerValidateEventArgs args)
        {
//code to textbox word match with database word.
        }

hope it helps :)

for further queries comment here!
 
Share this answer
 
v2
Comments
kwhiterosek 28-Jul-11 9:57am    
i am now somewhat clear sir.
can u suggest me how to use one of the database field to validate.
for eg:
I have used a textbox. if i want to check the typed word with the one in the database, i have to check the condition textbox1.text=='that database field' and then display the other db field using datalist control. i want to know how to mention 'that database field' or else is there any other possibilities?
help me pls..

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