javascript - .js variable from .cs method -
i've found topics related one, had no luck following them. so, have .js file
$(document).ready(function () { var bubblechart = new d3.svg.bubblechart({ data: { items: [ { text: "java", count: "236" }, { text: ".net", count: "382" }, { text: "php", count: "170" }, { text: "ruby", count: "123" }, { text: "d", count: "12" }, { text: "python", count: "170" }, { text: "c/c++", count: "382" }, { text: "pascal", count: "10" }, { text: "something", count: "170" }, ],
where need change "data" 1 have in database.
so far i've created method, returns list of class data (text , count).
i've tried doing
var data = <%=class/method()%>;
but '=' symbol no go, .js allows me ":", , says
"syntax error"
tl;dr:
how change "data" in .js return of .cs method returning list?
any appreciated greatly:)
edit: no luck far ...
Comments
Post a Comment