<script type="text/javascript">
$(document).ready(function () {
$("#mylist li span").each(function () {
var myid = $(this).attr('classid');
var mytext = $.ajax({
type: "POST",
url: "GetCountClass.ashx",
data: { "classid": myid },
async: false
}).responseText;
$(this).html(" ("+mytext+")");
});
});
</script>