Here i am pasting my code.
<script type="text/javascript">
$(function() {
var items = [{text: 'Onion', value: '1'},
{text: 'Ketchup', value: '2'},
{text: 'Mayonnaise', value: '3'},
{text: 'Pickles', value: '4'},
{text: 'Tomato', value: '5'},
{text: 'Patatoes', value: '6'},
{text: 'Sausage', value: '7'},
{text: 'Lettuce', value: '8'},
{text: 'Pepper', value: '9'}
];
$('#myCheckList').checkList({
listItems: items,
onChange: selChange
});
function selChange(){
var selection = $('#myCheckList').checkList('getSelection');
$('#selectedItems').text(JSON.stringify(selection));
}
});
</script>
I want in var items= ,it will take a method i.e getItems() and that method is written in ItemDAL.cs(DAL layer) and it is getting all the items list from database.How to do this? Can anyone suggest me?