Dynamic checkbox checked status

Posted by Murugavelmsc under C# on 7/23/2014 | Points: 10 | Views : 409 | Status : [Member] | Replies : 1
Hi Experts,

I have created a HTML Table row with checkbox has dynamic checkbox id.

How can i check the checkbox is checked (help of id).

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Raja on: 7/23/2014 [Member] Starter | Points: 25

Up
0
Down
The dynamic id for the checkbox generated by you should be guessable, like

<input type="checkbox" id="chk_1" />

<input type="checkbox" id="chk_2" />
<input type="checkbox" id="chk_3" />

Now do a for loop and try to form the id that you have generated dynamically and check the check box.

You can also get help from this article http://www.dotnetfunda.com/articles/show/1613/how-to-select-all-records-checkboxes-for-each-record-from-gridview-in.

There are many such articles on dotnetfunda.com, please search from the search box at top right corner.

Thanks, hope this helps.

Regards,
Raja, USA

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

Login to post response