How to validate controls [Resolved]

Posted by Santoshlogic under ASP.NET on 1/28/2013 | Points: 10 | Views : 890 | Status : [Member] | Replies : 11
i have one dropdown list containing 3 fields fullname,emailno,mobileno after selecing any one field then we got a message that please search by fullname in front of textbox. according to that i want to validate that textbox when selecting other fields how it can be done.....please suggest me..




Responses

Posted by: Kamilacbe on: 1/29/2013 [Member] Starter | Points: 50

Up
0
Down

Resolved
hi, i have understood that u need to validate the textbox according to the selection of ddmenu which displays a label of what has to be filled in the textbox , and that textbox has to be validated accordingly , in that case why dont write your event in selectedindexchanged.. as u choose your data frm ddmenu the textbox can b validated using "regx(regular expression) " .. this can solve your prob bt thn plss try to cutdown your choice as server side validation may leads to overhead to server.

hope this hepls you..

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kamilacbe on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
hi validation can be done in many ways , do you want to validate according to the DDmenu or the input in textbox can u plss explain more ..

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santoshlogic on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
Ok...after selection of dropdown list i wil get msg on label like search by fullname or search by email or search by mobileno according to that label i want to validate that textbox at runtime after selection of dropdown value there is only one textbox can it possible to validate it .....

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santoshlogic on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
ok bro ....thank u ....

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kamilacbe on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
hi,
Am not sure without using regular exp validation , that would be the choice which i prefer..


Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santoshlogic on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
ok i wil do that , any refrance for regular expresion you have please suggest me...
or give me expressions to accept mobileno or onlytext or emailid

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kamilacbe on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
this would give u an idea

http://www.9lessons.info/2009/03/perfect-javascript-form-validation.html

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santoshlogic on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
Thank you .....

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chaithragm on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
can this validation done by single text box?

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santoshlogic on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
i am trying to get code for that , but Kamilacbe sir said that regular expresson is the way to do that

Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kamilacbe on: 1/29/2013 [Member] Starter | Points: 25

Up
0
Down
hi ,

there are lot of way to validate a data this is one of the way which i prefer..


Santoshlogic, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response