Hai,
I want to write validations for textboxes using Javascript which is binded to datalist. .For Every datalist item textbox id is changing,How can we write validations for these textboxes using Javascript??
Regards,
Sree
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sreePosted Aug 13, 2013, 4:45 AM
Thank u Sanjeeb Lenka And Iftikar Hussain i got required output using Itemcommand.Insted of writing code at client side ,I wrote code at server side using Datalist ItemComand.
Regards
Sree
Sanjeeb LenkaPosted Aug 13, 2013, 2:27 AM
as you are using RequiredFieldValidator it will work for all textbox(txtEdit) inside your datalist .
plz provide your screen shot what exactly you want.
Iftikar HussainPosted Aug 13, 2013, 2:13 AM
sreePosted Aug 13, 2013, 2:10 AM
Iftikar HussainPosted Aug 13, 2013, 2:06 AM
Regards,
Iftikar
sreePosted Aug 13, 2013, 2:01 AM
when the Button was Click
TextBox :
Button :
Iftikar HussainPosted Aug 13, 2013, 1:56 AM
sreePosted Aug 13, 2013, 1:55 AM
Iftikar HussainPosted Aug 13, 2013, 1:52 AM
Regards,
Iftikar
sreePosted Aug 13, 2013, 1:48 AM
This is my datalist i tried to use required field validator,it is showing validation for each item in datalist.
I need to raise only perticular textbox validation with button click for each item.
Redards,
Sree
Iftikar HussainPosted Aug 13, 2013, 1:20 AM
Instead of using javascript you can directly use Validation Control. which will automatically take care of all textboxes id. Can you share your code?
Regards,
Iftikar
Sanjeeb LenkaPosted Aug 13, 2013, 1:07 AM
refer to this link for details any problem reply.
http://yasserzaid.wordpress.com/2009/04/08/access-the-control-inside-a-datalist-using-javascript/