Home:ALL Converter>Get generated checkbox id in javascript

Get generated checkbox id in javascript

Ask Time:2016-06-22T15:35:16         Author:Leonard Wong leothelion96

Json Formatter

Attempting to get generated checkbox ID

Current checkbox code

<asp:CheckBox ID="CheckBox_select"  type="checkbox" runat="server" onclick="javascript:CheckCheckBox(this);" />

Generated:

<input id="ContentPlaceHolder1_GridView_reminderList_CheckBox_select_10" type="checkbox" name="ctl00$ContentPlaceHolder1$GridView_reminderList$ctl12$CheckBox_select" onclick="javascript:CheckCheckBox(this);">

<input id="ContentPlaceHolder1_GridView_reminderList_CheckBox_select_11" type="checkbox" name="ctl00$ContentPlaceHolder1$GridView_reminderList$ctl11$CheckBox_select" onclick="javascript:CheckCheckBox(this);">

How to get ContentPlaceHolder1_GridView_reminderList_CheckBox_select_10 & ContentPlaceHolder1_GridView_reminderList_CheckBox_select_11 in javascript or even in asp.net?

Author:Leonard Wong leothelion96,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/37961446/get-generated-checkbox-id-in-javascript
yy