Let's use
jQuery
as you don't want to do postback. Try with below code
HTML code:
<asp:checkboxlist id="ChBMedia" runat="server" xmlns:asp="#unknown">
<asp:listitem>Media Article (TV/Radio/Newspaper) </asp:listitem>
<asp:listitem>Flyer</asp:listitem>
<asp:listitem>School (for student volunteers) </asp:listitem>
<asp:listitem>Other</asp:listitem>
</asp:checkboxlist>
<asp:textbox id="txtMedia" runat="server" xmlns:asp="#unknown"></asp:textbox>
Javascript code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$('#ChBMedia').on('click', ':checkbox', function() {
if ($(this).is(':checked')) {
var value = $(this).text();
alert(value);
if($("#txtMedia").val() == "")
{
$("#txtMedia").val(value);
}
else
{
$("#txtMedia").val($("#txtMedia").val() + ", " + value);
}
}
});
</script>
Above javascript code will append value to textboxe with comma separated onclick of checkbox. If you have different requirement then you can change the logic in javascript.